sockets: bind to external interface
Chris Angelico
rosuav at gmail.com
Mon Apr 25 15:49:07 EDT 2011
On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun <hg at schaathun.net> 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 0.0.0.0? Do you specifically need to *not* bind to
127.0.0.1?
Chris Angelico
More information about the Python-list
mailing list