diff --git a/how-to-use-glorytun.md b/how-to-use-glorytun.md index 4bb912d..ab3410f 100644 --- a/how-to-use-glorytun.md +++ b/how-to-use-glorytun.md @@ -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