Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to open a port in Vultr server?

by | Jan 11, 2019

Hosting custom build apps in Vultr instances need changes in default configuration.

And, what if your app uses a custom port ?

Definitely, we need to open the port in Vultr instance too.

At Bobcares, we help customers to open server ports in Vultr instances as part of our Managed Cloud Services.

Today, we’ll discuss on how to open port in Vultr server, common errors and their fixes.

 

When do you need to open port in Vultr?

By default, certain ports like the mail port 25 are not open in Vultr server.

Often, certain server owners would like to make email server work on port 25 itself. In such cases, we need to manually open port 25 on the Vultr server.

Additionally, if your server has a custom app, that listens on specific port, say 2828, this also requires firewall modification.

Also, due to security reasons, our Support Engineers often configure SSH on ports other than 22. Here, we make SSH listen on custom port and make that port open in server.

 

How to open port in Vultr server?

Server traffic depends largely on the firewall policy. There are different methods to open custom ports on the server. Now, we’ll see how our Support Engineers open a port in Vultr server.

 

1. Using Vultr Firewall Service

Vultr offers a web-based firewall solution. This Firewall service can be managed from the Vultr control panel. In this, the packet filtering takes place at a higher level on the network and therefore reduce resource usage on the server.

To setup, we first login to Vultr control panel and create a firewall group. After creating the group, we add desired rules to it. There are separate rules for IPv4 and IPv6 address types.

For example, to open SSH port 22, our Support Engineers add the rule as shown in the picture.

Similarly, when we need to open port 25 for the mail service, we choose the protocol as TCP and add rule to allow port 25. Also, in some accounts, we need to get approval from Vultr Support to allow port 25 access on the server.

 

2. Using Iptables

Yet another way to open port in Vultr server is by modifying the iptables rules on the server. These rules take effect immediately. Therefore, any wrong rule can completely lock out your server.

To allow port 25 on a CentOS6 server, our Dedicated Engineers use the following command:

iptables -A INPUT -p tcp --dport 25 -j ACCEPT

After adding the rule, mail service will start listening on port 25 of the Vultr server.

Here, we take special care to ensure that port is open in Vultr firewall service too.

 

3. Using firewall utilities like UFW, CSF

Managing server ports using iptables requires some expertise in firewall rules.

That’s why, for server owners that require additional security, we often recommend firewall tools like UFW, CSF, etc. They allow finer rule customization and comes handy in managing Vultr server traffic.

In Ubuntu servers, UFW (Ubuntu firewall) is installed by default. The syntax to open a port is:

sudo ufw allow /

Therefore, to open port 25, our Dedicated Engineers use the command:

sudo ufw allow 25/tcp

Similarly, when the Vultr server has CSF (Config Server Firewall), our Support Engineers modify the csf.conf inside /etc/csf directory. And, then configure the necessary ports in csf.conf file.

However, in Vultr server having CentOS 7, to make CSF work, we have to first disable the default firewall application called “firewalld“. Or else, it will conflict with the working of CSF.

Common problems with opening port

Till now, we saw the different ways to open port in Vultr server. However, often customers run into problems while modifying the firewall rules. Let’s have a look at them.

 

1. Port block in central firewall

At times, the services on the newly opened port may not work if there are additional firewall outside the server. For example, when a port is open in the server firewall, but Vultr firewall service totally block the port access on the server group, things will not work.

Here, to fix the problem, our Dedicated Engineers first check the packet route and see the position at which firewall blocks traffic. We, then make changes in the firewall at appropriate levels.

 

2. Wrong firewall edit

A rather common problem in Vultr servers is adding wrong firewall rules. When you have wrong rules in place, even the server access will be cut off.

Here, as the rules are already saved, normal access will not work. Therefore, our Dedicated Engineers log in to the server through the console from the Vultr website interface, and input “iptables -F” to flush all of the iptables rules. Then, we set up the correct rules again.

[Need help in opening port on Vultr server? We can help you.]

 

Conclusion

Opening port in Vultr server can be done using Vultr firewall service, iptables, etc. But, a wrong step can block all access to the server. Today, we’ve seen how our Dedicated Engineers open port in Vultr server without breaking server access.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF