iptables doesn't know what -dport 80 is... ?
[root@amazon oneiric]# /sbin/iptables -A INPUT -i eth0 -p tcp -dport 80 -j ACCEPT
Bad argument `80' Why is it giving me an error? This is what otehr threads and netfilter documentation says to type.. I use Redhat 8.0 if that makes any difference. |
Did you try only below command?
iptables -A INPUT -i eth0 -p tcp -dport 80 -j ACCEPT |
You might want to post your entire firewall script. It could be something like you never set up the INPUT table.
|
try --dport instead of -dport
|
Or stop using lazy shortcuts ( I do it too) and use
--destination-port 80 |
you have to specify --dport (two dashes) which is pretty clearly stated in the documentation, the short help and about all the help you can find on the internet.
also you ALWAYS have to specify a protocol to be able to specify a sport / dport (in your case you did -p tcp/udp) cheers, Nils |
replaced -dport with --dport and that worked. Thank you :)
|
All times are GMT -5. The time now is 06:58 AM. |