So I've found myself in an unfortunate situation where I cannot port forward on my router. My solution to this was to setup an openvpn tunnel on my VPS that would allow me to access my LAN via a NAS that I keep online in my apartment. (In other words, my laptop would connect to my VPS, which would route to my apartment via my NAS, and thus expose the LAN). The big problem is that the network uses 192.168.1.0/24, and given that I cannot edit any router settings, I cannot change this. If I were to simply expose this subnet via openvpn, I wouldn't be able to access any other 192.168.1.0/24 address if I were connect to the VPN.


My plan was to try and use some iptables magic to map 10.24.0.0/24 to 192.168.1.0. Luckily, this works, thanks to the NETMAP extension (iptables -A PREROUTING -t nat -d 10.24.0.0/24 -j NETMAP --to 192.168.1.0/24, for the curious). However, the only way I can make this work is if I add the NAS as a gateway on all of the machines I want to connect to on my LAN, which is a bit sad (ip route add 192.168.255.0/24 via 192.168.1.69) .


Is there some way I can make this a bit more seamless? This isn't my least favorite solution, as I don't need to run the openvpn client on every host, but it isn't much better...