mirror of
https://github.com/vvzvlad/trickster-vpn.git
synced 2024-12-26 19:00:59 +03:00
fixed a bug incorrect interface selection
This commit is contained in:
parent
8548ed7bf6
commit
df3d8b70ec
@ -1,8 +1,8 @@
|
|||||||
[Interface]
|
[Interface]
|
||||||
Address = 10.20.30.2/32
|
Address = 10.20.30.2/32
|
||||||
PrivateKey = ---PRIVATE_KEY_EXTERNAL---
|
PrivateKey = ---PRIVATE_KEY_EXTERNAL---
|
||||||
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
|
|
||||||
#internal node
|
#internal node
|
||||||
[Peer]
|
[Peer]
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
Address = 10.20.30.1/32
|
Address = 10.20.30.1/32
|
||||||
ListenPort = 17968
|
ListenPort = 17968
|
||||||
PrivateKey = ---PRIVATE_KEY_INTERNAL---
|
PrivateKey = ---PRIVATE_KEY_INTERNAL---
|
||||||
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostUp = ip rule add from `ip route | awk '/default/ {print $3; exit}'` table main
|
PostUp = ip rule add from `ip route | awk '/default/ {print $3; exit}'` table main
|
||||||
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostDown = ip rule del from `ip route | awk '/default/ {print $3; exit}'` table main
|
PostDown = ip rule del from `ip route | awk '/default/ {print $3; exit}'` table main
|
||||||
|
|
||||||
#external node
|
#external node
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[Interface]
|
[Interface]
|
||||||
Address=10.20.30.2/32
|
Address=10.20.30.2/32
|
||||||
PrivateKey=6CCRP42JiTObyf64Vo0BcqsX6vptsqOU+MKUslUun28=
|
PrivateKey=6CCRP42JiTObyf64Vo0BcqsX6vptsqOU+MKUslUun28=
|
||||||
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
|
|
||||||
#internal node
|
#internal node
|
||||||
[Peer]
|
[Peer]
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
Address = 10.20.30.1/32
|
Address = 10.20.30.1/32
|
||||||
ListenPort = 17968
|
ListenPort = 17968
|
||||||
PrivateKey = kOd3FVBggwpjD3AlZKXUxNTzJT0+f3MJdUdR8n6ZBn8=
|
PrivateKey = kOd3FVBggwpjD3AlZKXUxNTzJT0+f3MJdUdR8n6ZBn8=
|
||||||
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostUp = ip rule add from `ip route | awk '/default/ {print $3; exit}'` table main
|
PostUp = ip rule add from `ip route | awk '/default/ {print $3; exit}'` table main
|
||||||
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
|
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
||||||
PostDown = ip rule del from `ip route | awk '/default/ {print $3; exit}'` table main
|
PostDown = ip rule del from `ip route | awk '/default/ {print $3; exit}'` table main
|
||||||
|
|
||||||
#external node
|
#external node
|
||||||
|
Loading…
Reference in New Issue
Block a user