LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2013, 10:55 PM   #1
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Rep: Reputation: Disabled
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.
 
Old 09-26-2013, 11:09 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
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?
 
Old 09-26-2013, 11:18 PM   #3
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-27-2013, 12:26 AM   #4
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by humbry View Post
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.
 
Old 09-27-2013, 02:00 AM   #5
itlb
LQ Newbie
 
Registered: Aug 2013
Distribution: Debian
Posts: 29

Rep: Reputation: Disabled
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...
 
Old 09-29-2013, 10:27 AM   #6
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218

Rep: Reputation: 38
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
routing from VM to server Waldorf Linux - Networking 4 03-07-2008 09:00 AM
keyboard is borked TroelsSmit Linux - Newbie 16 10-05-2004 07:12 AM
I think I borked xmms paperdiesel Linux - Software 2 07-23-2004 07:33 PM
sshd is borked Zac2003 *BSD 2 09-25-2003 04:59 PM
x is borked Enigma Linux - Newbie 3 01-18-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration