[Asterisk-Users] asterisk behind Linux iptables with masquerading and forwarding on

Bartosz Wegrzyn - asterisk junk at lexoncom.com
Mon Oct 3 08:16:24 MST 2005


Hi,

I have this setup

DSL ROUTER---->LINUX----->ASTERISK

LINUX acts as a router with this config:
ppp0 - internet interface (public)
eth1 - private interface: 192.168.1.254

asterisk interface 192.168.1.251

settings on LINUX:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p udp --dport 5060 -i ppp0 -j DNAT --to
192.168.1.251
iptables -t nat -A PREROUTING -p udp --dport 10000:20000 -i ppp0 -j DNAT
--to 192.168.1.251

Before I had this setup I had the same config, but instead of LINUX i used
the Wr54G router with port forwarding on. It looks like that I
misconfigured the iptables, but I dont know what I did wrong. Do I have to
add extra translation settings.  Thanks

Any ideas???





More information about the asterisk-users mailing list