I can SSH into server but no HTTP, FTP or Mail

5,406

It sounds to me like a classic firewall issue on the default CentOS install.

You can check this easily from the command line by typing "/sbin/iptables -I INPUT -p tcp --dport 80" as root and see if that allows you to connect on port 80. If that works, then you know its probably a firewall.

The firewall is located in /etc/sysconfig/iptables - you can edit this with a text editor (you can copy the rule for port 22 [ ssh ] to the other ports, then save the file and run "/etc/init.d/iptables restart" to reload the firewall, or simply change the default "DROP" rule to allow and do the restart if you want to live dangerously.

Share:
5,406

Related videos on Youtube

Senya Peter Cullen
Author by

Senya Peter Cullen

Updated on September 18, 2022

Comments

  • Senya Peter Cullen
    Senya Peter Cullen over 1 year

    I'm stumped I've been spending the last two days on this and am no closer to a solution. I've just purchased a virtual linux server and can't get it to work I can connect to the server over SSH from the terminal on my computer (mac osx) But I can't make a connection over anything else, like HTTP (port 80), FTP, POP, IMAP, etc My DNS is on a different server but is working fine Requests for my domain name get correctly routed to the server Apache appears to be all set up correctly with the right listening ip's/ports etc And here's the strange thing ... Running tcpdump on port 80 reveals requests from my browser are getting to the server But the server doesn't reply and the browser results no connection to the server The server is not responding on any port other than SSH

    I've tried calling my provider but no-one can help me They just fob me off to an email address for the department that handles virtual servers I've emailed the department two days ago and have had no response

    Firstly, can anyone suggest anything I can try to diagnose the problem? I have very limited server knowledge Secondly, is it ok to post the ip of my server and domain name here for others to try connecting for me? i'm not sure, sometimes these forums don't like you posting your own links because they consider it spam.

    BTW, it's centos with ispconfig 3

    thank you for any assistance!

    • Senya Peter Cullen
      Senya Peter Cullen over 9 years
      I'm a douche, I just disabled the firewall and it works now - but tyhe new question is, why would the firewall be blocking everything?
  • Senya Peter Cullen
    Senya Peter Cullen over 9 years
    you were correct, it was the firewall, but it was strange, all i did was stop it and restart it and now it doesn't block me. i didn't reconfigure anything, just restarted it. oh well, it works.
  • mr5
    mr5 over 8 years
    I have the same problem with the OP. I have typed this command but nothing shows up? What else could I do?
  • davidgo
    davidgo over 8 years
    @mr5 - Nothing should show up, the command simply modifies your firewall. Have you tried accessing a page on the web server, and what do tcpdump and the web server logs show?
  • mr5
    mr5 over 8 years
    @davidgo Thanks for your response. I have setup an Apache Tomcat on Ubuntu server running on port 8080. The server is hosted in cloudapp.net Now I want to access it in my Windows machine via http. I can access the server locally and it is working fine. The only problem I think is that, the http port is not configured yet. I have tried tcpdump and this is the response tcpdump: no suitable device found
  • mr5
    mr5 over 8 years
    Uhm, I forgot to include some arguments in tcpdump. But I think it is working.