runfalk / synology-wireguard

WireGuard support for some Synology NAS drives
MIT License
919 stars 131 forks source link

How to add route for two interfaces #84

Closed nohnaimer closed 3 years ago

nohnaimer commented 3 years ago

Hi, I have two interfaces on Synology: eth0 - internet, eth1 - local net. Config wg0:

[Interface]
Address = 10.0.1.1/24
ListenPort = 51820
PrivateKey = ....
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; sleep 5 ; ip route add 10.0.1.0/24 dev %i
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

.....

How to get access to local net for some clients?

runfalk commented 3 years ago

Please create a Discussion (https://github.com/runfalk/synology-wireguard/discussions) instead.

The issue tracker is for problems with the package itself, not a support forum for how to use WireGuard.