Article 5PBCN Ubuntu Linux - Cannot Access from local host after enable firewall

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,

sulqlatest?d=yIl2AUoC8zA latest?i=X0Rowas-6JM:7zyRBErpyFA:F7zBnMy latest?i=X0Rowas-6JM:7zyRBErpyFA:V_sGLiP latest?d=qj6IDK7rITs latest?i=X0Rowas-6JM:7zyRBErpyFA:gIN9vFwX0Rowas-6JM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments