Hello everybody. For the last two weeks, I’ve been trying to set up 3 WireGuard VPN’s. I was successful once, but it ended up in something I didn’t want.
I’ve got these three devices:
Main router with public IP:
subnet: 192.168.1.0/24
WireGuard interface: 172.20.20.1/29 (port: 13232)
WireGuard peer to: sub-router (allowed: 172.20.20.2/32,172.20.20.0/29), sub-router2 (allowed: 172.20.20.3/32,172.20.20.0/29)
Ip>filter: 1: accept input 17(udp) dst.port:13232
2: accept input src.address: 172.20.20.0/29
ip>nat: action:dst-nat chain:dstnat protocol:6(tcp) dst.port:8096 in.interface:wireguard-tunnel to-adresses: 192.168.1.10 to-ports:8096
nat: action:dst-nat chain:dstnat protocol:6(tcp) dst.port:8000 in.interface:wireguard-tunnel to-adresses: 192.168.1.11 to-ports:80
Sub router with natted public IP:
subnet 192.168.2.0/24
WireGuard interface: 172.20.20.2/29 (port: 13233)
WireGuard peer to: main-router (allowed: 172.20.20.2/32,172.20.20.0/29)
Ip filter: 1: accept input protocol:17(udp) dst.port: 13233
2: accept input src.address: 172.20.20.0/29
Second sub router with natted public IP:
subnet 192.168.3.0/24
WireGuard interface: 172.20.20.3/29 (port: 13234)
WireGuard peer to: main-router (allowed: 172.20.20.3/32,172.20.20.0/29)
Ip filter: 1: accept input protocol:17(udp) dst.port: 13234
2: accept input src.address: 172.20.20.0/29
I successfully set this up by dstnatting and srcnatting lan subnets at first, but I don’t want to access the whole subnet from each router. I would like to access the WireGuard subnet on each router’s subnet, so I can access my Jellyfin media server and my Nextcloud from the two sub-routers.
So my idea is I put 172.20.20.1:8096 in the web browser on one of the subnet’s machines or dst-nat it to the router and access it from there.
I can successfully ping each device from the Mikrotik terminal or SSH into it, but not from the local network.
I appreciate your help in advance.