[Twisted-web] Binding twistd to a Specific IPv4 Address

Eric Radman theman at eradman.com
Mon Apr 4 05:21:54 MDT 2005


Is there a way to instruct twistd to bind to a specific IPv4 address?
Right now I'm setting up each server on it's own port and redirecting
packets with iptables:

# Apache
iptables -t nat -A PREROUTING -p tcp -d 10.1.1.1 --dport 80 \
    -j DNAT --to-destination 10.1.1.1:8001

# Twisted 1
iptables -t nat -A PREROUTING -p tcp -d 10.1.1.2 --dport 80 \
    -j DNAT --to-destination 10.1.1.2:8002

# Twisted 2
iptables -t nat -A PREROUTING -p tcp -d 10.1.1.3 --dport 80 \
    -j DNAT --to-destination 10.1.1.3:8003

This is kind of messy.

-- 
Eric Radman



More information about the Twisted-web mailing list