angt / glorytun

Multipath UDP tunnel
BSD 2-Clause "Simplified" License
675 stars 103 forks source link

How to start as a server #77

Closed groegeorg closed 3 years ago

groegeorg commented 3 years ago

The Wiki Mini HowTo seems incorrect about how to start glorytun as a server:

# ./glorytun bind 0.0.0.0 keyfile gt.key      
Option 0.0.0.0 is unknown

From looking at the code, the bind command requires another subcommand (dev, keyfile, from, to, persist or chacha), but none of these seem appropriate to start it as a server.

angt commented 3 years ago

Hello, Yes, because the howto explains how to use the stable version and not master.

groegeorg commented 3 years ago

Oh, my bad! Thanks for clarification!

angt commented 3 years ago

No problem :)

groegeorg commented 3 years ago

Just of curiosity, do you plan a new stable release any time soon?

angt commented 3 years ago

Yes, you can follow the "roadmap" here. Dates are very approximate, it depends on many external things :)

groegeorg commented 3 years ago

(sorry for the editing, I wasn't aware that email-reply go directly to the github issue. I'd prefer to send you a mail, but couldn't find contact information)

I'm still having trouble getting glorytun to work. I would be very grateful, if you could give me a hint on what I might have done wrong.

I have two VMWare virtual machines running Linux (VM-20 and VM-16):

VM-20 (Client)
tun0  10.6.6.20
ens38 10.5.5.20

VM-16 (Server)
tun0  10.6.6.16
ens38 10.5.5.16

I follow the instructions on your Wiki Tutorial:

On the server (VM-16):

VM-16% sudo ./glorytun bind 0.0.0.0 keyfile mykey.key
VM-16% sudo ifconfig tun0 10.6.6.16 pointopoint 10.6.6.20 up

On the client (VM-20):

VM-20% sudo ./glorytun bind 0.0.0.0 to 10.5.5.16 keyfile mykey.key
VM-20% sudo ifconfig tun0 10.6.6.20 pointopoint 10.6.6.16 up
VM-20% sudo ./glorytun path 10.6.6.20 dev tun0 up

At this point I can see (with tcpdump) UDP packets arriving at VM-16 at an interval of 1 second. However, I still cannot ping 10.6.6.16, or send data through the tunnel. The path information shows me that the path is "DEGRADED":

VM-20% sudo ./glorytun path
path UP
   status:  DEGRADED
   bind:    10.6.6.20 port 5000
   public:  - port 0
   peer:    10.5.5.16 port 5000
   mtu:     0 bytes
   rtt:     0.000 ms
   rttvar:  0.000 ms
   rate:    fixed
   losslim: 100
   beat:    100 ms
   tx:
     rate:  0 bytes/sec
     loss:  0 percent
     total: 867 packets
   rx:
     rate:  0 bytes/sec
     loss:  0 percent
     total: 0 packets

By stepping through the code I believe it has something to do with MTU discovery, but I got a bit lost there. Do you maybe have an idea what could be wrong?

angt commented 3 years ago

Hello,

First, you can contact me at adrien at gallouet dot fr :)

When a tunnel does not ping you can do glorytun show dev XXX bad to see if glorytun can help you. Generally, people forget to check few things:

I hope this will help you, release 0.4.x will be much easier to configure :)