I have written one ip.sh file in that I have written one rule and then saved the iprules with the corresponding commands. Now when I opened /etc/sysconfig/iptables nothing is reflecting. I need the steps for this to get effect of new iprules and I want to restore the old file.
-
@Rabin Thanks for the answer. i have written a rule like iptables -A INPUT -i eth0 -p tcp --sport 443 -m state --state NEW -j ACCEPT. after that when i run nmap -v -p 443 127.0.0.1, it's showing the status was closed. how to change the status from closed to open.subbarao– subbarao2014-07-23 09:45:45 +00:00Commented Jul 23, 2014 at 9:45
Add a comment
|
1 Answer
- run you
ip.shscript and setup your iptables - make sure you rules are applied
iptables -nvL | less - save you rules with
iptables-save > /etc/sysconfig/iptables
-
Thanks for the answer. i have written a rule like iptables -A INPUT -i eth0 -p tcp --sport 443 -m state --state NEW -j ACCEPT. after that when i run nmap -v -p 443 127.0.0.1, it's showing the status was closed. how to change the status from closed to open.subbarao– subbarao2014-07-25 06:04:21 +00:00Commented Jul 25, 2014 at 6:04
-
lo interface a usually not blocked, please post your full iptables with the command
iptables -nvLRabin– Rabin2014-07-25 10:35:02 +00:00Commented Jul 25, 2014 at 10:35