I have an Asterisk installation on CentOS on a box with four ethernet cards (actually two dual port cards) eth0, eth1, eth2, eth3. I am currently having a problem with dropped calls and to reduce the finger pointing want to put the box directly on the providers circuit using a static IP address (I have several available from the provider).
Eth2 is currently facing the subnet with the phones. I would like to use eth3 to interface to the internet using the fixed IP from the provider as I do not have enough IP address for all the phones, and do not want to reprovision all of them. How do I set up IP forwarding to & from eth2 & eth3?
To rephrase, I would like eth2 to service the phone subnet, and eth3 to connect to the internet via a fixed IP, and for the asterisk traffic to and from phones (subnet) and trunks (internet) to be automagically routed to the correct place and the connections with the trunk maintained. Since the trunk can originate connections when inbound calls are received, I need to provide for that in the rules as well.