No internet access

We’re using FreePBX v.12.0.25, and I have 2 NIC cards installed and configured. The first goes to our local network and the second to our SIP Trunk provider. Both connections work fine except I do not have outside internet. The SIP trunk does not have internet access, but our internal network does. I created a firewall rule to allow all traffic from the phone servers IP address as allowed. I have the network configs below though I have changed the numbers. I also set up the primary and secondary DNS addresses under \System Admin\DNS. The system works fine for internal and external calls except for the fact that I cannot update due to no internet access. Any ideas?

I can ping the SIP IP address and DNS addresses
I can ping the local gateway/firewall and local DNS addresses
I cannot ping www.google.com or anything else on the internet.

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
IPADDR=173.168.0.10
NETMASK=255.255.254.0
GATEWAY=173.168.0.1
HWADDR=xx:xx:xx:xx:xx:xx

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
IPADDR=183.168.0.10
NETMASK=255.255.254.0
GATEWAY=183.168.0.1
HWADDR=xx:xx:xx:xx:xx:xx

Hi,

You should use your LAN default gateway for internet access no matter what. Please remove the default gateway from your eth0 and leave only the eth1 default gateway. What you should do in order to be routed to your SIP provider is to add a static route to your Linux server. Since you did not mentioned your SIP provider’s ip address in your trunk, I will give you a little example that you will be able to customize.

Let us assume that the ip address of your SIP provider is 200.200.200.100.
Add a permanent static route to the file /etc/sysconfig/network-scripts/route-eth0 like this:

200.200.200.100/24 via 173.168.0.1 dev eth0

After adding this file, you will need to restart your network service like that:

service network restart

To check that everything was added to the routing table, you can check it like that:

route -n

Do not forget to add all of your local networks to the sip settings module (173.168.0.0/23 and the SIP provider’s LAN).

Just one warning though:
If you are not sure how to do it, I suggest to work in a console environment to avoid locking yourself out of the server.

Thank you,

Daniel Friedman
Trixton LTD.