Let's try another forwarding method.
Remove the PREROUTING rule from the iptables ruleset. Now install xinetd with "sudo apt-get install xinetd". In the directory /etc/xinetd.d/ create a file named "asterisk" (or any other name you want) with this content:
Code:
service astforward
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
bind = 0.0.0.0
log_on_failure += USERID
redirect = ip.addr.of.server 5060
}
with the server's IP address in the redirect line.
Now edit the file /etc/services and create a new service called astforward with a line:
Code:
astforward 15060/tcp # forwarder to asterisk
Restart xinetd with "sudo service xinetd restart" and see what happens when you connect to port 15060.