D
D
Dima Petrov2018-07-17 17:10:58
Asterisk
Dima Petrov, 2018-07-17 17:10:58

Forward sip packets from port to port?

how to forward packets from port 6161 to 5060, I need the PBX to work on two ports at once

iptables -t nat -A PREROUTING -p udp -m udp --dport 6161 -j DNAT --to-destination net_ip:5060

iptables -t nat -A PREROUTING -p udp -m udp --dport 6161 -j DNAT --to-destination 127.0.0.1:5060

iptables -t nat -A PREROUTING -p tcp -m tcp --dport 6161 -j DNAT --to-destination 127.0.0.1:5060

Tried different options, registration does not pass.
for ssh this rule works.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Makarov, 2018-07-18
@atsman

most likely inside the sip package itself (at level 7) it is written that port 5060, iptables rules only packets at level 4. remove tcpdump there everything will be visible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question