How to configure apache and iptables to allow incoming connections ubuntu server?
17,316
Try
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
Related videos on Youtube
Author by
Tamim Addari
Updated on September 18, 2022Comments
-
Tamim Addari over 1 year
I am trying to configure my server to allow apache running on port 80 to allow incoming connections. I ran this command
sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
But Still I can't get the page from other computer browsers but , when I type localhost in my PC browser , everything is fine.Is there any other thing to configure for accepting incoming traffic ?
-
Tamim Addari about 9 yearsBTW , should I use the same command if I want port 3306 for mysql to accept?
-
2707974 about 9 yearsYes, but I recommended , because of security, to do not allow acces to mysql from net.