[asterisk-users] 2 NICs; Asterisk receives on eth1 and replies on eth0

Daniel Lawson daniel at meta.net.nz
Mon Jul 10 22:21:23 MST 2006


kjcsb wrote:
> I have an Asterisk server with 2 network cards. One provides the LAN
> connection and the other provides the Internet connection. Currently
> this is set up in the following way:
>
> eth0 192.168.1.5. This provides LAN connectivity
>
> eth1 192.168.1.251, gw 192.168.1.252 (Note that other nodes on the
> network use a different gateway, not 192.168.1.252). This provides the
> internet connection. The router is set up with DMZ enabled and
> pointing to 192.168.1.251. 

I am going to assume you are using a netmask of 255.255.255.0 above, as
you haven't specified it.

You can't have both interfaces being on the same network. This is why
you are having this problem. I'd suggest making the Asterisk -> upstream
link inside a different network, such as 192.168.2.xxx.

EG:

eth0 192.168.1.25   LAN

eth1 192.168.2.1  gw 192.168.2.254         
set the router up with DMZ enabled and pointing to 192.168.2.1


I'd also suggest you  connect eth1 on the asterisk box directly to the
gateway, and don't plug them into your LAN switch. You may need to use a
crossover cable to do this.



More information about the asterisk-users mailing list