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

The port has startup logs but hasn't actually started. #137

Closed ly-druid closed 10 months ago

ly-druid commented 11 months ago

Run log: INFO server > Remote address is: 127.0.0.1:12446 INFO server > 1 cores available DEBUG neli::socket > Message sent: Nlmsghdr { nl_len: 64, nl_type: Newaddr, nl_flags: NlmFFlags(FlagBuffer(1, PhantomData)), nl_seq: 0, nl_pid: 0, nl_payload: Payload(Ifaddrmsg { ifa_family: Inet6, ifa_prefixlen: 128, ifa_flags: IfaFFlags(FlagBuffer(0, PhantomData)), ifa_scope: 0, ifa_index: 54, rtattrs: RtBuffer([Rtattr { rta_len: 20, rta_type: Local, rta_payload: Buffer }, Rtattr { rta_len: 20, rta_type: Address, rta_payload: Buffer }]) }) } INFO server > Created TUN device tun0 INFO server > Listening on 4567

dndx commented 11 months ago

Any proof?

haohetao commented 10 months ago

I have same problem. 图片 and i can't seen listen port. 图片

图片

dndx commented 10 months ago

Phantun does not use the Kernel TCP stack and therefore won't show up in netstat. You should use tcpdump to troubleshoot.

haohetao commented 10 months ago

@dndx 图片 图片 图片

haohetao commented 10 months ago

Add the following command to solve the problem

iptables -A FORWARD -i tun0 -j ACCEPT
iptables -A FORWARD -o tun0 -j ACCEPT