How to open a port on server/VPS

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
Hello,

Please give me steps to open a port number on VPS/Server.

Before this step, I would check if that port is opening or closed then how?

Thank you in advance.
 

sh-admin

Active member
Registered
Joined
Sep 29, 2016
Messages
66
Points
0
Is it a plane VPS or have control panel on it ? and what OS do you have on this VPS
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
This will show open ports
netstat -lntu


This will work with CentOS 5 and older versions of debian

iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
service iptables save

in this example port 80 is opened.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Yes it will be fine on CentOS 6. However it will not apply to CentOS 7 which uses systemD and firewallD which do work a little different.
 
Older Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top