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
Share:
17,316

Related videos on Youtube

Tamim Addari
Author by

Tamim Addari

Updated on September 18, 2022

Comments

  • Tamim Addari
    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
    Tamim Addari about 9 years
    BTW , should I use the same command if I want port 3306 for mysql to accept?
  • 2707974
    2707974 about 9 years
    Yes, but I recommended , because of security, to do not allow acces to mysql from net.