Routing / multiple nic help please


I have two ADSL connections. I have two routers

Usually i run the phones off one router on one network as well as freepbx

I run my internet and computer off the other network

Its annoying as if I want to configure the phones etc from a computer they are not on same network so it involves pluggin in to that network. Also now the phones can be linked to the web browsers but not if on different networks

What I would like to achieve is the following but I dont know terminology or where to start

Put two NICs into the free pbx box

Connect router 1 to switch with all PCs running DHCP. NIC 1 on linux box is connected to switch

Router 1 - 192.168.1.* DHCP apart from freepbx is

Connect Router 2 to the freepbx on NIC 2

Router 2 192.168.2.* DHCP only connected to freepbx box

My computers will take DHCP from 192.168.1.* and register to freepbx

How do i ensure that all external sip traffic only goes over the NIC2 ?

Hopefully then all computers and phones on ROUTER 1 and ROUTER 2 only has the SIP traffic going down it so its dedicated. I can still login to freepbx and phones from the 192.168.1. network with no tunneling etc

Wow that took longer than i thought ! Thanks for any help in advance

Turn on ip forwarding /etc/sysconfig and then use the PBX as a gateway for the Voice LAN. Add a static route to the voice network in the PC you want to manage them from.

With private IP’s you should not have an security issues with this.

I don’t generally advocate using a phone system as a router. The best course is to use a VLAN capable router.