Hi,
I'm running a Debian Squeeze 6.0.1a box that's connected to my ISP via an L2TP connection that's managed by OpenL2TPD.
The box is configured to perform NAT from local clients (on eth0) to the internet (on ppp0).
However, I'm having an issue with TCP packets that are sent from the box itself to the internet (packets originally coming from the local clients get sent and received over the internet just fine)
I'm using this Python app to test this:
Code:
#!/usr/bin/env python
import socket, time
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', 5003))
s.listen(1)
while 1:
conn, addr = s.accept()
print 'Connection accepted, ', addr
time.sleep(3)
print "Sending data"
conn.send("1")
print "Sent 1"
conn.send("2"*1024)
print "Sent 2"
conn.send("3"*2048)
print "Sent 3"
print "Done sending data"
conn.close()
If the application is ran on a local machine, the client that connects to it receives the entirety of the data,
Though if it's ran on the Debian box, the client that connects to it only receives the first packet ("1").
How can I solve this?
Thanks in advance.
P.S.
These are my iptables rules:
Code:
# iptables -t nat --list
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
(I also add a rule to forward the connection from the Debian box to the local machine when I test this with the app there)