[asterisk-users] Problems with 2 Asterisk servers on same LAN

Artem Makhutov artem at makhutov.org
Sun Sep 7 12:36:13 CDT 2008


Hi,

On Sat, Sep 06, 2008 at 09:52:45PM -0400, hugolivude wrote:
> OS = CentOS 5
> Asterisk = 1.4.21
> Router = WhiteRussian 0.9
> 
> Not sure whether I have a problem w/ Asterisk or White Russian config,
> so I'm posting to both lists.
> 
> I _think_ I have the ports forwarded correctly on my router. I set
> DESTINATION ports for the SIP & RTP ports above such that ports 5060 &
>  10000-20000 go to 192.168.2.160 while ports 5070 & 21000-25000 got to
> 192.168.2.170.  Frankly I find the Firewall GUI a little unintuitive –
> here's what /etc/config/firewall looks like:
> 
> forward:proto=udp dport=5060:192.168.2.160
> forward:proto=udp dport=10000-20000:192.168.2.160
> 
> forward:proto=udp dport=5070:192.168.2.170
> forward:proto=udp dport=20001-25000:192.168.2.170
> [...]

I think, that your problem is the port forwarding on the WhiteRussian
box.

Please try to setup the port forwarding in /etc/firewall.user
instead of /etc/config/firewall.

/etc/config/firewall has never worked for me.

Try something like this:

iptables -t nat -A prerouting_wan -p udp --dport 5060 -j DNAT --to 192.168.2.160
iptables        -A forwarding_wan -p udp --dport 5060 -d 192.168.2.160 -j ACCEPT

iptables -t nat -A prerouting_wan -p udp --dport 10000:20000 -j DNAT --to 192.168.2.160
iptables        -A forwarding_wan -p udp --dport 10000:20000 -d 192.168.2.160 -j ACCEPT

Regards, Artem



More information about the asterisk-users mailing list