0
I don't know a lot about network routing. Hopefully this is easy.
- I have my ISP-provided router providing IP's via DHCP on 192.168.10.0/24
- That's connected to the "red" interface of a Nethserver (firewall appliance)
- The Nethserver's "green" interface provides IP's via DHCP to the LAN on 192.168.100.0/24
$ ip route # on the firewall
default via 192.168.10.1 dev em1
192.168.10.0/24 dev em1 proto kernel scope link src 192.168.10.10
192.168.100.0/24 dev p2p2 proto kernel scope link src 192.168.100.1
- The laptop on the 192.168.100.0/24 network is connected to a VPN
$ ip route # on the laptop
default via 10.8.8.1 dev tun0 proto static metric 50
default via 192.168.100.1 dev enp0s25 proto static metric 100
10.8.8.0/24 dev tun0 proto kernel scope link src 10.8.8.27 metric 50
169.254.0.0/16 dev tun0 scope link metric 1000
192.168.100.0/24 dev enp0s25 proto kernel scope link src 192.168.100.10 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
209.X.Y.Z via 192.168.100.1 dev enp0s25 proto static metric 100
I will get that router out of there at some point, but for now I want to be able to get from my laptop to the web interface of that router at 192.168.10.1. How do I add something to the routing table to do that?
(Bonus points: A not-too-long reference that will help me understand at least the basics of network routing.)
Ah! Ok, i'll do all that just for the edification, but I just tried with another laptop and I realized the issue ... I'm behind a VPN. (Somehow I had thought that shouldn't effect local IP blocks, but obviously that's wrong ...) I'll add that to my question, but how can I add a route for the router in this context of the VPN? – Diagon – 2019-06-08T18:22:45.623
That works! Now I think from my other reading, to make it persistent, I have to add this to /etc/network/interfaces as
post-up ip route add 192.168.10.0/24 via 192.168.100.1 dev enp0s25
. Many thinks. I'll also poke around for more reading. – Diagon – 2019-06-08T20:09:36.107