Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4028

Re: sockets: bind to external interface

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <prvs=090474412=jeanmichel@sequans.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'ubuntu': 0.04; 'socket': 0.05; ':-)': 0.07; 'bind': 0.09; 'hostname': 0.09; 'wrote:': 0.14; 'received:192.168.200': 0.16; 'subject:interface': 0.16; 'simpler': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'interface': 0.20; 'seems': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'manually': 0.22; 'checked': 0.25; 'work.': 0.27; 'lists': 0.28; 'external': 0.29; 'hi,': 0.29; 'cc:addr:python.org': 0.31; 'binding': 0.31; 'does': 0.31; 'anyone': 0.31; 'maps': 0.33; 'received:192': 0.34; 'there': 0.35; 'returned': 0.35; 'header:User-Agent:1': 0.35; 'thus,': 0.35; 'received:192.168': 0.37; 'two': 0.37; 'whatever': 0.39; 'solution': 0.40; 'simple': 0.60; 'address': 0.61; '127.0.0.1': 0.84
X-IronPort-AV E=Sophos;i="4.64,267,1301868000"; d="scan'208";a="1370132"
X-Virus-Scanned amavisd-new at zimbra.sequans.com
Date Tue, 26 Apr 2011 11:24:18 +0200
From Jean-Michel Pichavant <jeanmichel@sequans.com>
User-Agent Mozilla-Thunderbird 2.0.0.24 (X11/20100328)
MIME-Version 1.0
To Hans Georg Schaathun <hg@schaathun.net>
Subject Re: sockets: bind to external interface
References <k4vg88-0tt.ln1@svn.schaathun.net>
In-Reply-To <k4vg88-0tt.ln1@svn.schaathun.net>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.829.1303809867.9059.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 82.94.164.166
X-Trace 1303809867 news.xs4all.nl 81484 [::ffff:82.94.164.166]:34106
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:4028

Show key headers only | View raw


Hans Georg Schaathun wrote:
> Is there a simple way to find the external interface and bind a
> socket to it, when the hostname returned by socket.gethostname()
> maps to localhost?
>
> What seems to be the standard ubuntu configuration lists the local
> hostname with 127.0.0.1 in /etc/hosts.  (I checked this on two ubuntu
> boxen, on only one of which I am root.)  Thus, the standard solution
> of binding to whatever socket.gethostname() returns does not work.
>
> Has anyone found a simple solution that can be administered without
> root privileges?  I mean simpler than passing the ip address 
> manually :-)
>
> TIA
>   
Hi,

Use the address 0.0.0.0

JM

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar


Thread

sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 20:37 +0100
  Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 05:49 +1000
    Re: sockets: bind to external interface Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-04-25 13:13 -0700
    Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 21:14 +0100
      Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 21:24 +0100
        Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 07:21 +1000
      Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 06:30 +1000
        Re: sockets: bind to external interface Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 23:18 +0200
          Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 07:50 +1000
          Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-26 06:20 +0100
      Re: sockets: bind to external interface Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 23:14 +0200
  Re: sockets: bind to external interface Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-04-26 11:24 +0200

csiph-web