dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.58k stars 128 forks source link

Cannot work with udpspeeder #148

Closed zorgro closed 5 months ago

zorgro commented 7 months ago

udpspeeder is listen on 127.0.0.1:1234

[root@ben ~]# iptables -nvL -t nat Chain PREROUTING (policy ACCEPT 3073 packets, 169K bytes) pkts bytes target prot opt in out source destination
3760 203K DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL 643 31212 DNAT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:4567 to:192.168.201.2

client output: RUST_LOG=info output: INFO fake_tcp > Sent SYN to server INFO fake_tcp > Waiting for SYN + ACK timed out INFO fake_tcp > Sent SYN to server INFO fake_tcp > Waiting for SYN + ACK timed out INFO fake_tcp > Sent SYN to server INFO fake_tcp > Waiting for SYN + ACK timed out

server side: [root@perfect-buzz-3 ~]# tcpdump -vv dst port 4567 tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes

11:13:38.380653 IP (tos 0x0, ttl 115, id 52174, offset 0, flags [DF], proto TCP (6), length 52) 125.91.95.100.46539 > 175.91.95.100: Flags [S], cksum 0x06b3 (correct), seq 2974884871, win 64240, options [mss 1400,nop,wscale 8,nop,nop,sackOK], length 0 11:13:38.386058 IP (tos 0x0, ttl 115, id 52175, offset 0, flags [DF], proto TCP (6), length 52) 125.91.95.100.46562 > 175.91.95.100: Flags [S], cksum 0xb3c8 (correct), seq 1440010839, win 64240, options [mss 1400,nop,wscale 8,nop,nop,sackOK], length

dndx commented 5 months ago

Your server is not responding to the SYN packet from the client, suggest tcpdump on the server's tun interface to see what happened. Did the SYN packet reach the server at all?

zorgro commented 5 months ago

Thank you for your response.found the cause of the issue. It was due to incorrect network configuration parameters in the /etc/sysctl.conf file.

dndx commented 5 months ago

Good to hear!