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.71k stars 138 forks source link

PhanTun Not Connecting #158

Open asterdeve opened 5 months ago

asterdeve commented 5 months ago

Dear, Developer & all viewers I have tried last 3 days by all the way to connect this tunnel from local net & also from 2 dedicated servers, unfortunately the result is very frustrated with my all tried only ones I get successfully get connected. How? I don't know because all the settings was exactly same how it was guide for, I used binary released, please if anyone use this tunnel & successfully get connected all the time please help me out from this situation, I am using centos & puppy linux, thanks for your attention.

After I run I check if listening port is showing here strangely its not open any listing port for the phantun_server

[root@server32 ~]# sudo netstat -tulpn | grep LISTEN tcp 0 0 0.0.0.0:3306 0.0.0.0: LISTEN 1353/mysqld tcp 0 0 127.0.0.1:5038 0.0.0.0: LISTEN 17270/vpn tcp 0 0 0.0.0.0:2231 0.0.0.0: LISTEN 1212/sshd tcp 0 0 127.0.0.1:25 0.0.0.0: LISTEN 1452/master tcp 0 0 :::80 ::: LISTEN 1465/httpd tcp 0 0 :::2231 ::: LISTEN 1212/sshd tcp 0 0 ::1:25 :::* LISTEN 1452/master

Getting this output when I run it

INFO server > Remote address is: 127.0.0.1:1234 INFO server > 1 cores available INFO server > Created TUN device tun0 INFO server > Listening on 4567

Its showing here listening 4567 but in netstat showing nothing.

seek2222 commented 4 months ago

a quote from @dndx

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

dndx commented 3 months ago

Could you use tcpdump to see if packets are being sent out? Are Kernel forwarding enabled? Do you have the correct firewall rules?

asterdeve commented 2 months ago

No I haven't because I want to use it on CentOS 6.10 32 bits & I am getting this error when I try to run

/lib/libc.so.6: versionGLIBC_2.18' not found (required by /root/ptun/phantun_server)`

& in centos ldd --version is

ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

I try to upgrade glibc & I installed successfully but its giving lots of other error, & then I try to compiled in centos CentOS 6.10 32 bits but I couldn't.

and when I use another binary of phantun phantun_i686-unknown-linux-musl.zip I am getting this error

 RUST_LOG=info /root/ptun5 --local 4567 --remote 127.0.0.1:1234
 INFO  server > Remote address is: 127.0.0.1:1234
 INFO  server > 2 cores available
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: EBUSY', phantun/src/bin/server.rs:168:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but if I run simply ./phantun_server I am getting this output

error: The following required arguments were not provided:
  --local <PORT>
  --remote <IP or HOST NAME:PORT>

Usage: phantun_server --local <PORT> --remote <IP or HOST NAME:PORT>

For more information try '--help'

please help me I really want to use it, Thank you.

dndx commented 1 week ago

Please run with RUST_BACKTRACE=1 so it is easier to see where did the server panic.