Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.
|
|||||||
Begin your free trial now
Pay-as-you-go options starting at $10/user/month
Pay-as-you-go options starting at $10/user/month
RH9 Unable to access internet after setting Firewall? posted Today 07:08 PM
|
|
Thread Tools | Search this Thread |
|
#1
|
||||
|
||||
|
RH9 Unable to access internet after setting Firewall? posted Today 07:08 PM
Goodday!
Tried to setup Firewall using the Guide "RedHat Linux 9 for Dummies" I follow every single steps , and the firewall is succesfully setup. But i cannot access the internet when the Firewall is up. Below is what i have done! [root@localhost root]# iptables --flush [root@localhost root]# iptables --flush -t nat [root@localhost root]# iptables --policy INPUT DROP [root@localhost root]# iptables --policy OUTPUT DROP [root@localhost root]# iptables --policy FORWARD DROP [root@localhost root]# iptables -A OUTPUT -j ACCEPT -o lo [root@localhost root]# iptables -A INPUT -j ACCEPT -i lo [root@localhost root]# iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED --j ACCEPT [root@localhost root]# iptables -A OUTPUT -m state --state RELATED,ESTABLISHED --j ACCEPT [root@localhost root]# iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT --dport 22 [root@localhost root]# cd /etc/init.d/ [root@localhost init.d]# sshd start Extra argument start. [root@localhost init.d]# iptables -A OUTPUT -m state --state RELATED,ESTABLISHED --j ACCEPT [root@localhost init.d]# iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT --dport 80 [root@localhost init.d]# cd /etc/init.d/ [root@localhost init.d]# sshd start Extra argument start. [root@localhost root]# iptables -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere state NEW,ESTABLISHED tcp dpt:ssh Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED Chain RH-Lokkit-0-50-INPUT (0 references) target prot opt source destination [root@localhost root]# iptables-save > /etc/sysconfig/iptables [COLOR=blue]After i type the command below i cant access the internet![/COLOR] [root@localhost root]# /etc/init.d/iptables start Flushing all current rules and user defined chains: [ OK ] Clearing all current rules and user defined chains: [ OK ] Applying iptables firewall rules: [ OK ] Thankyou! |
|
#2
|
|||||||
|
|||||||
|
Quote:
Quote:
Quote:
Quote:
Quote:
Solution: type either of these:
On to the following... Quote:
Quote:
In short, all that your firewall accepts in the INPUT chain are packets that allow people from the outside to reach your SSH and HTTP server! Certainly not what you want... Oh, the packets you send out will be accepted, yes, but the problem is that returning packets will get dropped! If you want more details, read my thread, the URL of which I posted at the start of this post. Last edited by fgaliegue; 02-11-2006 at 12:13 PM.. Reason: Fixed URL |
|
#3
|
|||
|
|||
|
The quick fix
OK, here is a firewall that shoud set you on the way. First of all, flush all your chains, by typing:
service iptables stopThen do the following:
|
![]() |
| Similar Topics | ||||
| Topic | Replies | Forum | ||
Firewall not working Cannot enable No internet access
|
2 | Mobile Computing | ||
Can't access internet when firewall is enabled
|
4 | Software Apps | ||
I have no control panel can't access the internet. HJT log posted
|
3 | Virus and Malware Removal | ||
Setting Up Secure Internet Access
|
0 | Storage and Networking | ||
Unable to access certain Internet sites
|
2 | Storage and Networking | ||
| Thread Tools | Search this Thread |
|
|
All times are GMT -4. The time now is 05:36 AM.



Firewall not working Cannot enable No internet access