Updated how to use glorytun (markdown)

wxdczd
2019-12-25 08:42:24 +08:00
parent 1872a0b582
commit 25302c2c4b

@@ -5,19 +5,25 @@ chmod +x glorytun
**so my configs, server side:**
first create key
./glorytun keygen > gt.key
`./glorytun keygen > gt.key`
after run glorytun with bind server ip and port and tun interface (if need) , i use chacha, aes my client is not support..
./glorytun bind 195.245.103.245 55055 dev tun0 keyfile gt.key chacha
`./glorytun bind 195.245.103.245 55055 dev tun0 keyfile gt.key chacha`
adding ip address to tun0 interface:
ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up
`ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up`
route traffic from glorytun tunnel (tun0) to internet (eth0):
masqarade traffic from glorytun tunnel to internet:
iptables -t nat -I POSTROUTING -s 10.0.1.0/24 -o eth0 -j MASQUERADE
accept input traffic from tun0 interface:
iptables -I INPUT -i tun0 -j ACCEPT
`iptables -t nat -I POSTROUTING -s 10.0.1.0/24 -o eth0 -j MASQUERADE`
`accept input traffic from tun0 interface:`
`iptables -I INPUT -i tun0 -j ACCEPT`
enable forward traffic between tun0 (glorytun) and eth0(internet) interfaces:
iptables -I FORWARD -i eth0 -o tun0 -j ACCEPT