sockets: bind to external interface

Chris Angelico rosuav at
Mon Apr 25 21:49:07 CEST 2011

On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun <hg at> wrote:
> Has anyone found a simple solution that can be administered without
> root privileges?  I mean simpler than passing the ip address
> manually :-)

You can run 'ifconfig' without being root, so there must be a way. At
very worst, parse ifconfig's output.

The way you talk of "the" external interface, I'm assuming this
computer has only one. Is there a reason for not simply binding to
INADDR_ANY aka Do you specifically need to *not* bind to

Chris Angelico

More information about the Python-list mailing list