[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to Open Port 55000 on Linux (VPS) Webserver

Posted on 2009-04-23
12
Medium Priority
?
1,461 Views
Last Modified: 2013-12-15
I have an application that needs to communicated with my web server on port 55000 (TCP).

How do I do it?

The firewall has this port open (ingress and egress)
0
Comment
Question by:Calvin Close
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 24218650
0
 

Author Comment

by:Calvin Close
ID: 24218691
I am sorry but I am a bit of a novice at this.
I did iptables -L and got huge listing. Does this mean I am using iptables?
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24218714
I am also not familiar with it but it could be the reason. The tutorial is good in understanding and using iptables
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:fosiul01
ID: 24218833
Iptables -A INPUT -p tcp --dport 5000 -j ACCEPT

then save iptables
service iptables save
service iptables restart
0
 
LVL 4

Accepted Solution

by:
gunny051499 earned 1200 total points
ID: 24237069
Hi calvinclose,

I'm a bit lost at the question/answer combination. Is your problem that you have a remote application which is unable to access the webserver at port 55000?

You should definitely try the following:

1)
Execute "lsof -i -n | grep LISTEN" and see if the port 55000 is listed at all. If the webserver is running correctly there must be an open tcp socket at port 55000 waiting for incomming connections. You MUST execute this as root user!

2)
If your host is not running on a public network and you have access to the console, flush the local firewall rules:

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X

3)
Test if you can manually connect to the webserver using telnet and trying to request the webpage your application will connect to:

telnet IPADDRESS 55000

If you get the prompt "Escape character is '^]'.", you will be able to manually request a webpage like this:

GET / HTTP/1.0
Host: www.mydomain.com

[NOW PRESS RETURN TWICE]

The webserver will dump whatever webpage is configured as index on "www.mydomain.com".
Obviously this won't work on HTTPS! It is only for plain-text HTTP.

Cheers

Gunny
0
 

Author Comment

by:Calvin Close
ID: 24336289
Hi Gunny,

Thanks for your help.  I have been trying to get someone else to help me as well, but still no success.

Actually, I have a web application (WHMCS) that needs to access a remote server on port 55000 (a domain registrar).

The firewall lists port 55000 as being open for both incoming and outgoing connections
I did the lsof command and port 55000 is not listed.

I also try to telnet to my ip on port 55000 and it says that it cannot connect.

What could be wrong?

....Still looking to give away 500 points.

Cheers,

Calvin
# Common inbound (ingress) TCP ports
IG_TCP_CPORTS="(several listed including 52443,55000)"
 
# Common outbound (egress) TCP ports
EG_TCP_CPORTS="(several listed including 52443,55000)"

Open in new window

0
 
LVL 29

Assisted Solution

by:fosiul01
fosiul01 earned 800 total points
ID: 24336335
@author

to telnet 55000 port, some service will have to run on that port

if lsof -i tcp | grep 55000 does not show anything

that mean, the service you are trying to telnet is not running

make sure service is runing on that port

also have you added this command

Iptables -A INPUT -p tcp --dport 55000 -j ACCEPT
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 24336718
Hi Calvinclose,

I trust you saying you have that port open on your side. So if you cannot to the other side I guess this port is blocked by something in between.

You can test that by simply trying to telnet the remote server on port 55000 by some host. If you cannot connect from there either, that is proof enought, that the trouble lies somewhere in between.

As a second step you should try from somewhere outside your network, in order to exclude a problem on your side. If it still doesn't work, you should contact your domain registrar and ask them why they are locking things up! ;-)

Btw. please pay attention to one thing: most providers of this kind will not do something like port filtering, but they will restrict the IP addresses trying to connect to their services.

Please make sure to be in sync with your provider from that point as well!!

Cheers

Gunny
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 24336760
And there is one thing more: just not seeing port 55000 listed in iptables, doesn't mean it is open for you to connect to!! If the default rule is set to deny/reject you won't be able to connect. That's why I asked you to drop all filters under point no. 2 in my first post.

Regards

Gunny
0
 

Author Comment

by:Calvin Close
ID: 24336887
There is no service running on port 55000 on my web server. My application (WHMCS) has to issue commands at certain times (ie when someone wants to register a domain) to a remote server through port 55000. The remote server then sends response back to my server through this port.

Gunny, I have issued all the commands from your point 2.

Actually, I found out that I needed 2 ports open (52443 and 55000). I have done iptables command and opened ports in firewall for both of these.

Lastly, I can telnet to the remote server on port 52443 both from my laptop and from a putty console connected to my web server.

So, maybe the problem lies with the domain registrar (or the WHMCS plugin).

I will try this angle again.
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 24337043
do that - and as before: see that you are in sync with them if they are restricting access by IP address!
0
 

Author Closing Comment

by:Calvin Close
ID: 31573949
Thanks to all for your help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month17 days, 17 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question