-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP2Raw Server Under CGNAT doen't send ACK back #542
Comments
I cannot reproduce.
there can be many possible reasons:
|
I tried to capture on each possible interface, but the issue still persists.
I forgot to mention that the two devices I tested are OpenWRT routers, and my broadband is fiber-optic. After the router establishes the internet connection, it creates a pppoe-wan interface. I conducted another test, setting up a port forwarding rule on the router (B) to forward TCP traffic on port 52821 to a Debian machine (C) on the LAN. C was also running the same udp2raw command, listening on TCP port 52821. This time, I received the expected ACK. So, could the issue really be a compatibility problem with the pppoe-wan interface? I hope someone with a similar setup can reproduce this issue. root@op2 ➜ tcpdump -ni any tcp port 52821
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
09:17:22.129257 pppoe-wan In IP 202.xxx.176.10.51908 > 100.xxx.18.215.52821: Flags [S], seq 3626595006, win 64240, options [mss 1460,sackOK,TS val 68757137 ecr 0,nop,wscale 7], length 0
09:17:22.129308 eth1 Out IP 202.xxx.176.10.51908 > 192.168.36.187.52821: Flags [S], seq 3626595006, win 64240, options [mss 1452,sackOK,TS val 68757137 ecr 0,nop,wscale 7], length 0
09:17:22.129514 eth1 In IP 192.168.36.187.52821 > 202.xxx.176.10.51908: Flags [S.], seq 1603582039, ack 3626595007, win 4xxx6, options [mss 1460,sackOK,TS val 4106189137 ecr 68757137,nop,wscale 5], length 0
09:17:22.129556 pppoe-wan Out IP 100.xxx.18.215.52821 > 202.xxx.176.10.51908: Flags [S.], seq 1603582039, ack 3626595007, win 4xxx6, options [mss 1452,sackOK,TS val 4106189137 ecr 68757137,nop,wscale 5], length 0
09:17:22.133328 pppoe-wan In IP 202.xxx.176.10.51908 > 100.xxx.18.215.52821: Flags [.], ack 1, win 502, options [nop,nop,TS val 68757142 ecr 4106189137], length 0
09:17:22.133384 eth1 Out IP 202.xxx.176.10.51908 > 192.168.36.187.52821: Flags [.], ack 1, win 502, options [nop,nop,TS val 68757142 ecr 4106189137], length 0
09:17:22.133330 pppoe-wan In IP 202.xxx.176.10.51908 > 100.xxx.18.215.52821: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 68757142 ecr 4106189137], length 0
09:17:22.133418 eth1 Out IP 202.xxx.176.10.51908 > 192.168.36.187.52821: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 68757142 ecr 4106189137], length 0
09:17:22.346xxx2 pppoe-wan In IP 202.xxx.176.10.51908 > 100.xxx.18.215.52821: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 68757355 ecr 4106189137], length 0
09:17:22.34xxx28 eth1 Out IP 202.xxx.176.10.51908 > 192.168.36.187.52821: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 68757355 ecr 4106189137], length 0
09:17:22.554769 pppoe-wan In IP 202.xxx.176.10.51908 > 100.xxx.18.215.52821: Flags [F.], seq 1, ack 1, win 502, options [nop,nop,TS val 68757563 ecr 4106189137], length 0
... |
My ISP uses Fullcone NAT, and I can retrieve my public IP after NAT using a tool called Natter. I previously set up a WireGuard tunnel using this method.
I am attempting to add a TCP layer under WireGuard, but it does not work as expected. And after debuggin, I found the udp2raw server on Host B is not sending ACK responses when receiving SYN packets from Host A.
Setup Details:
Host B run udp2raw server (wireguard listen on UDP 51821, udp2raw listen on TCP 52821)
./udp2raw_amd64 -s -l0.0.0.0:52821 -r127.0.0.1:51821 -k "xxx" --raw-mode faketcp -a
Host A run ncat, test TCP connect with B's mapped public ip after NAT
Host B udp2raw output, it shows that B get syn from A, but repeat many times
Host B tcpdump, it shows that B receive A tcp sync, but no ack sent back
I tested this on a machine with a public IP using the same method. The expected behavior for Host B is to send an ACK back.
The text was updated successfully, but these errors were encountered: