I can SSH into server but no HTTP, FTP or Mail
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.
Related videos on Youtube
Senya Peter Cullen
Updated on September 18, 2022Comments
-
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 over 9 yearsI'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 over 9 yearsyou 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 over 8 yearsI have the same problem with the OP. I have typed this command but nothing shows up? What else could I do?
-
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 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 viahttp
. I can access the server locally and it is working fine. The only problem I think is that, thehttp
port is not configured yet. I have triedtcpdump
and this is the responsetcpdump: no suitable device found
-
mr5 over 8 yearsUhm, I forgot to include some arguments in
tcpdump
. But I think it is working.