Python security settings

Gary Herron gherron at islandtraining.com
Tue May 11 17:39:03 EDT 2004


On Tuesday 11 May 2004 01:18 pm, Laughlin, Joseph V wrote:
> import SimpleXMLRPCServer
> rpc_server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 3010))
> print "XMLRPC Server started!"
> rpc_server.serve_forever()
>
> When I run this program, I can connect to port 3010 on the localhost,
> but I can't connect to the port from any other machine (or from the
> local machine using the machine's hostname).  Why is this?
>
> Joe Laughlin
> Phantom Works - Integrated Technology Development Labs
> The Boeing Company

Use
  SimpleXMLRPCServer.SimpleXMLRPCServer(("", 3010))
instead of
  SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 3010))

For server sockets (which this is creating), the host name specifies
which name to accept connections as.  A blank name means accept
connectrions as any name (localhost, or any other host name the
machine may have).

Gary Herron






More information about the Python-list mailing list