Greets - I’ve recently changed a network configuration (due to some sip trunking requirements) where I now have two NICs on board my F-PBX server. I have full setup functional, wherein:
eth0 is my LAN, subnet 172.20.3.x/25 with no gateway set, and hosts phones/clients only.
eth1 is my WAN egress subnet 192.168.240.4/28 with a gw of 192.168.240.1 - and pushes through my router and firewall.
I am not using the F-PBX firewall as it’s already covered and I didn’t need extra complexity until I was able to resolve the next issue:
I have a couple other subnets local to us (read: inside LAN) - for example 172.21.10.x/24 and 172.21.15.x/24, and are available to eth0, but since there is no gw for eth0, it doesn’t know how to route to them. Those subnets are NOT available to eth1.
I’m a Debian guy, not RHEL/Centos, so I’m not sure if iptables works the same way here or not.I know how to do this in debian, but don’t want to break F-PBX trying the same tricks.
What I’d like to do is put some entries into the routing table for eth0 that for subnets 172.21.x.x, to use a gw of 172.20.3.1 (which is a valid gw available to eth0) instead of the default gw noted on eth1. Once it gets to 172.20.3.1, my router can handle next-hop.
Unfortunately, I cannot intercept the traffic once it has exited eth1 to default gw and re-route it as that would create a bad routing loop. The most appropriate spot to determine the routing is at the server.
Assist most appreciated!