0

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 Jul 23 '14 at 9:45
0
  1. run you ip.sh script and setup your iptables
  2. make sure you rules are applied iptables -nvL | less
  3. 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 Jul 25 '14 at 6:04
  • lo interface a usually not blocked, please post your full iptables with the command iptables -nvL – Rabin Jul 25 '14 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.