Alexander / Aebian

Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...


The Categories



Stuff

Legal
Media Creations
My Projects
My Hardware
Some Spotify


February 19th at 4:27am
Report an Issue
Sidebar ➠

❬ Back to Blog


Exclude specific IP from routing [Edgemax]


Want to exclude a specific IP from routing to make it accessible? e.g. if you have a modem in front of your Edgerouter with own IP and no bridge mode? Here's how

by

Hi guys,

Imagine a situation like this:

The modem has his own dhcp server and is only there to provide internet.
The reason for this (in my case at least) is that fibre is currently work-in-progress in my city, so the expansion takes a while until it reaches my house. Till March 2019.


So my Edgerouter is currently providing my internal infrastructure while my modem provides the eth0 wan connectivity.
In this case I had my internet first routed over vtun0 which encrypted my traffic over VPN. However I was unable to access the modem interface on 10.0.1.1 sadly.

For this to get working I had to redo my firewall. You can adapt the code and fit your needs:


What this does is to route all traffic going to the subnet 10.0.1.0/24 directly to it and not over the vtun0 interface which would only be able to transmitt to the wan.
This is because the 10.0.1.0/24 subnet is not managed by the Edgerouter. Instead it is managed by the modem.

You can define more direct firewall routes this way. Just remember that your VPN interface e.g. vtun0 needs to have the highest priority.
This way you will ensure that traffic to the outside (WAN) will always go trough the VPN tunnel.

That's it!



Over and Out,

Aebian