Ubuntu Linux - Cannot Access from local host after enable firewall
by sulq from LinuxQuestions.org on (#5PBCN)
Hi,
I am a newbie in Linux. I am using Ubuntu Linux 18.04.
I just setup an apache server running at port 80.
I try to access from local machine and from other machines within the same network and it works fine.
Then I try to enable the firewall and it block all the incoming port, so I cannot access from the local machine and from other machines within the network.
Then I add a new rule using ufw to allow from anywhere to access port 80 and check with ufw status.
The new rule is displayed correctly, but it does not work.
Then I add a new rule using iptables:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
After adding the new rule using iptables, I am able to access from other machine within the same network, but I still CANNOT access the port 80 from my local machine.
Anybody can help?
Thanks,
sulq
I am a newbie in Linux. I am using Ubuntu Linux 18.04.
I just setup an apache server running at port 80.
I try to access from local machine and from other machines within the same network and it works fine.
Then I try to enable the firewall and it block all the incoming port, so I cannot access from the local machine and from other machines within the network.
Then I add a new rule using ufw to allow from anywhere to access port 80 and check with ufw status.
The new rule is displayed correctly, but it does not work.
Then I add a new rule using iptables:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
After adding the new rule using iptables, I am able to access from other machine within the same network, but I still CANNOT access the port 80 from my local machine.
Anybody can help?
Thanks,
sulq