Code: Select all
# iptables -I FORWARD 2 -p tcp -i ppp0 -d 192.168.1.2 --dport 4662 -j ACCEPT
- 192.168.1.2 is my PC ip address
- 4662 the port I want to open (amule)
If i execute this command I can see that the rule is correctly applied by iptables:
Code: Select all
# iptables -vL
Chain FORWARD (policy ACCEPT 8843 packets, 1194K bytes)
pkts bytes target prot opt in out source destination
1790 1248K ACCEPT all -- ppp0 any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- ppp0 any anywhere 192.168.1.2 tcp dpt:4662
419 25084 TCPMSS tcp -- any ppp0 anywhere anywhere tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
0 0 ACCEPT icmp -- any any anywhere anywhere icmp fragmentation-needed
0 0 DROP all -- ppp0 any anywhere anywhere
Instead, if I open the same port using the web interface all goes right.
Therefore I think I also have to set some other parameter in way portforwarding can work properly but I do not know what it is.
Anyone could help me?