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.67k stars 134 forks source link

Not Connecting to the server #64

Closed asterdeve closed 2 years ago

asterdeve commented 2 years ago

Dear, Developer & All Experts, I was trying to use it in my local & live server on both sides is not working, below I post the log of server & client.

Server Log

RUST_LOG=debug /usr/bin/ptunS -4 --tun PTUN-Server --local 1080 --remote 127.0.0.1:9966
 INFO  server > Remote address is: 127.0.0.1:9966
 INFO  server > 1 cores available
 INFO  server > Created TUN device PTUN-Server
 INFO  server > Listening on 1080

Client Log

RUST_LOG=debug /usr/bin/ptunC -4 --tun PTUN-Client --local 127.0.0.1:9966 --remote 192.168.172.32:1080
 INFO  client > Remote address is: 192.168.172.32:1080
 INFO  client > 1 cores available
 INFO  client > Created TUN device PTUN-Client

It's remaining like that & not changing anything.

Now I am using udp2row its working fine, I am planning to use this for iptables port forwarding via tun0 [hope I can do that]

please me if this tunnel can fulfill below requirement

  1. I am planning to use this to bypass Asterisk VoIP Blockage
  2. if 1st one is yes then 2nd I wan to use this for iptables port forwarding via tun0

Thanks in advance, waiting for some hopeful feedback.

dndx commented 2 years ago

@asterdeve Are you sending packets to 127.0.0.1:9966? Phantun only initiates connection after the first UDP packet arrives.