Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-26-2013, 10:55 PM
|
#1
|
LQ Newbie
Registered: Feb 2012
Posts: 21
Rep: 
|
Only able to connect on port 22
This is a little bit of a newbie post; should I post in the newbie forum?
I have a server on a shared (kvm) host, fresh install of CentOS 6.2.
I can SSH to the server using its IP address, but I cannot connect to any other port so far (notably, unless I connect from localhost).
All connections are via IP address to simplify - no need to talk about DNS issues.
I am running this:
nc -k -l 8080
There is no other software running on that port. For fun, I tried with port 25000 - same results.
I have verified the port is open in iptables
netstat shows the listener (and it goes away when I kill nc, so it seems like it should work)
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 12418/nc
The hosting platform claims to not block any ports (and they are a large provider; there is little reason to think that they would).
Below are my iptables rules - very simple.
What else can I use to diagnose why the server is not accepting outside connections beside SSH?
# Generated by iptables-save v1.4.7 on Thu Sep 26 22:27:09 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2:296]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
## -A INPUT -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Thu Sep 26 22:27:09 2013
Last edited by humbry; 09-26-2013 at 11:01 PM.
|
|
|
09-26-2013, 11:09 PM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316
|
What do you mean by "can't connect"? Lack of willpower?
What error do you get? Does tcpdump show any bytes returned by the server? How are you connecting? Why are you using port 8080?
|
|
|
09-26-2013, 11:18 PM
|
#3
|
LQ Newbie
Registered: Feb 2012
Posts: 21
Original Poster
Rep: 
|
Connecting from another server far, far away using telnet:
Trying 12.34.56.78...
telnet: connect to address 12.34.56.78: Connection timed out
As noted, I also tried port 25000
This shows nothing at all:
tcpdump -nn -q -A -s 1024 -t dst port 8080
Starting to feel like there IS some kind of block being applied by the provider?
Last edited by humbry; 09-26-2013 at 11:27 PM.
|
|
|
09-27-2013, 12:26 AM
|
#4
|
LQ Newbie
Registered: Feb 2012
Posts: 21
Original Poster
Rep: 
|
Quote:
Originally Posted by humbry
Starting to feel like there IS some kind of block being applied by the provider?
|
Or I could have mis-typed the IP address.
Sorry for the trouble.
|
|
|
09-27-2013, 02:00 AM
|
#5
|
LQ Newbie
Registered: Aug 2013
Distribution: Debian
Posts: 29
Rep: 
|
Only able to connect on port 22
I would disable iptables for troubleshooting purposes.
If you can still not nc the port then its probably your provider...
|
|
|
09-29-2013, 10:27 AM
|
#6
|
Member
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218
Rep:
|
You are saying you are able to connect to port 22 using SSH protocol. That means there is a SSH server listening.
Now, is there anything actually listening on port 8080, e.g. a web server like httpd?
Why did you try to connect to port 25000? What shold be listening there? As long as there is nothing listening at a port nothing could answer any connection attempt.
|
|
|
All times are GMT -5. The time now is 06:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|