Dual NIC setup

Hi All,

Hope you well. I’ve Just setup a new VM with two NICs with freepbx 1.1100.211.63 with the below config for the NICs. Just wanting to know if this is correct, if not how to correct it? Also how would I setup DNS? Lastly, when I setup a SIP trunk, how would I set it to use the external NIC?

External

Device = "eth0"
Bootproto="none"
Netmask-255.255.255.0
IPAddr=192.168.3.15
Gateway=192.168.3.5

Internal

Device = "eth1"
Bootproto="none"
Netmask-255.255.255.0
IPAddr=192.168.2.15
Gateway=

Thank you in advanced.

Hammad

Just Google “Centos network setup”. I think that will answer all of your questions.

As far as the SIP trunk goes, You’ll have an IP address or a FQDN for the sip provider. As long as your default route is set for your external card, or you have defined a route through that card, your system will find the SIP provider.

BF

You’re correct to have the gateway setting on the external interface. You should have any gateway setting on the internal interface. For DNS you can do the following in your ifcfg-eth0:

DNS1=xx.xx.xx.xx
DNS2=yy.yy.yy.yy

This will update your /etc/resolv.conf file when you boot the system or start/restart the network.

If you setup a SIP trunk that is not part of a local network (e.g. 192.168.2 or 192.168.3) then this will route out via the default gateway on eth0.

Make sure you add both local names to the SIP configuration (localnet=) and the external IP address of your router/firewall to the same SIP setup (externip=).

Thank you Bill and Lee.

I will go ahead with your solution Lee, and see how I get on. as for sip config will the below do the trick?

localnet=192.168.1.0, 192.168.2.0,192.168.3.0
externip= (ISP provided Static IP address)

I have a 192.168.1.0 network too for client machines, whilst 192.168.2.0 is for servers. They get routed via a Microsoft TMG Backend Firewall.

Kind Regards,

Hammad

Thank you Bill and Lee.

I will go ahead with your solution Lee, and see how I get on. as for sip config will the below do the trick?

localnet=192.168.1.0, 192.168.2.0,192.168.3.0
externip= (ISP provided Static IP address)

I have a 192.168.1.0 network too for client machines, whilst 192.168.2.0 is for servers. They get routed via a Microsoft TMG Backend Firewall.

Kind Regards,

Hammad

In the localnet settings you also need the subnet mask of the network (e.g. 255.255.255.0). Also I think you need separate lines for each localnet so:

localnet=192.168.1.0/255.255.255.0
localnet=192.168.2.0/255.255.255.0
localnet=192.168.3.0/255.255.255.0

also set nat=yes.

Hi Lee,

Thank you very much for your advice. I managed to setup the PBX to a degree. SIP trunk is up and running, according to the system status it is registered and online!! :slight_smile:

However I can not seem to access the PBX from one of the Internal subnets using x-lite.

192.168.2.0 can connect, however 192.168.1.0 can not, I get a SIP error 408

Any ideas how I can sort this out?

Regards

Hammad

I assume that you can do a traceroute from the 192.168.1.0/24 network to the PBX system. Which interface should this come in on? eth0 or eth1?

Lee