[asterisk-users] iptables for SIP talk to other port
geisj at pagestation.com
Sat Oct 15 11:17:27 CDT 2016
I have a host 192.168.1.3 that wants to run SIP on 5068 (long story).
My host is 192.168.10.201.
My host needs to stay on 5060 because of all the other devices I have
I tried putting port=5068 in my SIP extension definition but that did not
So I thought about using iptables to accomplish this:
iptables -t nat -A PREROUTING -p tcp --dport 5068 -j
REDIRECT --to-port 5060
iptables -t nat -A POSTROUTING -p tcp --dport 5060 -d 192.168.1.3 -j
REDIRECT --to-port 5068
Do I not have the right format of the command?
Anything incoming destined for 5068 redirect to 5060...
Anything going out to 192.168.1.3 and port 5060 redirect to 5068.
Seems like that should have worked?
Thoughts? sip show peers still says unreachable.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users