Hi guys,
I found a solution myself in O'Reilly's Security Power Tools. It works
seamlessly as follows:
from socket import *
SO_ORIGINAL_DST = 80
s = socket(AF_INET, SOCK_STREAM)
s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
s.bind(('192.168.255.254', 80))
s.listen(1)
conn, addr = s.accept()
dst = c
Hi guys,
On netfilter-based NAT systems there is theoretically a possibility to
retrieve the original address *after* NAT'ing a connection. In C, this
can be done as in squid, a transparent HTTP proxy:
http://paste.pocoo.org/show/216495/
I'd like to do the same in Python. So I started with a