tweak to access LAN
wg0.conf
19 lines 979 B view raw
1[Interface] 2PrivateKey = <REDACTED> 3Address = 198.51.100.1/24 4ListenPort = 51820 5PostUp = iptables -I FORWARD 1 -o %i -d 198.51.100.2/32 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 6PostUp = iptables -I FORWARD 2 -i %i -s 198.51.100.2/32 -d 192.168.0.0/24 -j ACCEPT 7PostUp = iptables -I FORWARD 3 -i %i -d 192.168.0.0/24 -j REJECT --reject-with icmp-port-unreachable 8PostUp = iptables -t nat -A POSTROUTING -s 198.51.100.0/24 -o enp37s0 -j MASQUERADE 9 10PostDown = iptables -D FORWARD -o %i -d 198.51.100.2/32 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 11PostDown = iptables -D FORWARD -i %i -s 198.51.100.2/32 -d 192.168.0.0/24 -j ACCEPT 12PostDown = iptables -D FORWARD -i %i -d 192.168.0.0/24 -j REJECT --reject-with icmp-port-unreachable 13PostDown = iptables -t nat -D POSTROUTING -s 198.51.100.0/24 -o enp37s0 -j MASQUERADE 14 15# BEGIN ANSIBLE MANAGED BLOCK FOR salman 16[Peer] 17PublicKey = <REDACTED> 18AllowedIPs = 198.51.100.2/32 19# END ANSIBLE MANAGED BLOCK FOR salman