Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-09-2012, 09:29 PM   #1
Registered: Nov 2011
Posts: 36

Rep: Reputation: Disabled
cant get the port open on server!

i have 2 (very simple) python scripts, which try to connect to each other through port XXXX, if they both run on same machine, there is no problem, but if one of them is on a remote machine, python just says no route to host which i guess means the port is still closed
i tried these:
iptables -I INPUT -p tcp --dport XXXX -j ACCEPT
iptables -I INPUT -p tcp --dport XXXX -j ACCEPT
iptables -I OUTPUT -p udp --dport XXXX -j ACCEPT
iptables -I OUTPUT -p udp --dport XXXX -j ACCEPT
but no luck! what am i doing wrong?

ps: if i set the script on remote to port 80 (which is open and NOT in use), the client side does nothing, just trying to connect...
Old 06-09-2012, 09:41 PM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,319

Rep: Reputation: Disabled
"No route to host" does not normally mean that the port is closed, but rather that the IP address cannot be reached.

Is the script on the receiving end listening to the proper IP address? Can you connect to the listeninge port with telnet or netcat (nc) from either the local machine or the remote system?

How about posting some lines from the scripts?
Old 06-09-2012, 09:57 PM   #3
Registered: Nov 2011
Posts: 36

Original Poster
Rep: Reputation: Disabled
well i can ping! but i cant telnet to the port script is running on (80) even if i change the port
i can ssh too
netcat says nothing on connecting, just exits


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
[SOLVED] Help me open a port for my Minecraft server Lumify Linux - Newbie 8 07-29-2012 02:52 PM
Cannot connect to server to open Port 22 DAMarisa Linux - Newbie 3 07-28-2011 07:00 PM
How to open port for some server? windstory Linux - Newbie 8 02-10-2011 12:28 PM
How to open a port on a Centos 5 server swamprat Linux - Newbie 7 04-16-2009 06:54 PM
CVS server open port question gstasica Linux - Networking 6 11-12-2004 08:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 PM.

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