Skip to content
Adrien Gallouët edited this page Mar 27, 2020 · 4 revisions

Glorytun does not touch the configuration of its network interface (except for the MTU). It is up to the user to do it according to the tools available on his system (systemd-networkd, netifd, ...). This also allows a wide variety of configurations.

To start a server:

# (umask 066; glorytun keygen > gt.key)
# glorytun bind 0.0.0.0 keyfile gt.key &

You should now have an unconfigured network interface (let's say tun0). For example, the simplest setup with ifconfig:

# ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up

To check if the server is running, simply call glorytun show or glorytun show dev tun0 if you have several tunnels started.

To start a new client, you have to get the secret key generated for the server. Then simply call:

# glorytun bind 0.0.0.0 to <SERVER_IP> keyfile gt.key &
# ifconfig tun0 10.0.1.2 pointopoint 10.0.1.1 up

It's almost done! Now you have to setup your first path.

For this, You need the local ip of the interface and the rate (upload and download to your server). Let's say you have an ADSL link that can do 1Mbit upload and 20Mbit download then call:

# glorytun path up <LOCAL_IP> rate tx 1mbit rx 20mbit

Again, to check if your path is working, you can watch its status with glorytun path. You should now be able to ping your server with ping 10.0.1.1.

A simple IP masquerade on the server side should be enough to give you access to Internet from your tunnel:

# iptables -w -t nat -A POSTROUTING -o <WAN_IFACE> -s 10.0.1.2 -j MASQUERADE
Clone this wiki locally