LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   no longer able to connect to internet (https://www.linuxquestions.org/questions/linux-newbie-8/no-longer-able-to-connect-to-internet-4175514245/)

sniper8752 08-11-2014 10:51 AM

no longer able to connect to internet
 
I am no longer able to connect via the internet. I added these lines to my interfaces file:
pre-up iptables-restore < /etc/iptables.rules
post-down iptables-restore < /etc/iptables.downrules

Any ideas on why this change would have caused this? I am trying to restore iptables here.

smallpond 08-11-2014 03:31 PM

Do your rules start off by flushing the old rules?

sniper8752 08-11-2014 04:18 PM

no. how do I do that?

smallpond 08-12-2014 01:31 PM

To remove all added rules and chains, put these two lines at the beginning of your scripts:

Code:

iptables -F
iptables -X

If you added rules or chains in other tables besides FILTER, you need to explicitly flush them also using the '-t table' option.

sniper8752 08-18-2014 08:18 PM

Sorry - new to this. What script do I add it to?


All times are GMT -5. The time now is 06:32 AM.