Ports
Could I allow a packet to transit in the FORWARD chain (under masquerading) from some host (or any host) to a host on a port?
iptables -A FORWARD -p tcp -s 0.0.0.0/0 -d 192.168.2.101 -dport 80 -j ACCEPT
don't work (only one -d is allowed). What can I do?
Thank you very much
Bye
Mattia
Quoted 1 line
iptables -A FORWARD -p tcp -s 0.0.0.0/0 -d 192.168.2.101 -dport 80 -j ACCEPT
It is: --dport, not -dport
Regards
Quoted 4 lines · Mattia Martinello
Could I allow a packet to transit in the FORWARD chain (under masquerading) from some host (or any host) to a host on a port?
iptables -A FORWARD -p tcp -s 0.0.0.0/0 -d 192.168.2.101 -dport 80 -j ACCEPT
I think that your problem is --dport. You missed a "-".
Ramin
Quoted 7 lines
don't work (only one -d is allowed). What can I do?
Thank you very much
Bye
Mattia
Ramin Alidousti ha scritto:
Quoted 4 lines
I think that your problem is --dport. You missed a "-".
Ramin
Thank all wery much!
Bye
Mattia
Quoted 7 lines · Mattia Martinello
Could I allow a packet to transit in the FORWARD chain (under masquerading) from some host (or any host) to a host on a port?
iptables -A FORWARD -p tcp -s 0.0.0.0/0 -d 192.168.2.101 -dport 80 -j ACCEPT
don't work (only one -d is allowed). What can I do?
You can add another '-' :-)
iptables -A FORWARD -p tcp -d 192.168.2.101 --dport 80 -j ACCEPT
(The -s 0.0.0.0/0 is redundant - remove it to keep thing simpler.)
Antony.
Signature · 3 lines
90% of network problems are routing problems. 9 of the remaining 10% are routing problems in the other direction. The remaining 1% might be something else, but check the routing anyway.