Ubuntu is one of the best versions that are released by Linux. Because it’s an open source, you can control on it unlike Windows OS. Some people search for a way of opening port in Ubuntu. While there are some ports are responsible for accessing some websites.
In China and other countries, there are some blocked websites which are under some of ports’ bandwidth.
So, opening port in Ubuntu is very important for many people who can’t access social networking websites like Facebook, Twitter, or live streaming service like Netflix.
Opening port in Ubuntu methods:
Opening port in Ubuntu can be done using two methods either via scripting or using wizard.
First: opening port in Ubuntu using wizard
1. Open GuFw Firewall Configuration.
2. click on the plus button under the rules
3. Give the rule a name.
4. choose allow in policy combo box
5. Then choose both in Direction box.
6. Then choose do not log in “Log” box.
7. Write wanted port at “1” position, IP at “2” position the press add.
Second: Opening port in Ubuntu using scripting
Before opening port in Ubuntu or closing it, we recommend to first verifying if the port is open or closed and who is using the port. There a number of different commands:
Commands to verify ports:
nmap IP#
nmaplocalhost
netstat –ntulp
to verify single port
netstat -nap | grep<port #>
to list all current rules in iptables
iptables -L
For opening a TCP port:
iptables -A INPUT -p tcp –dport<port #> -j ACCEPT
For opening a UDP port:
iptables -A INPUT -p udp –sport <port #> -j ACCEPT
Save changes:
iptables-save> /etc/iptables.rules
*Note: If you need to disable the firewall temporarily, you can flush all the rules using:
iptables -F
If you want to open banned sites without needing of opening port in Ubuntu, you can use the VPN “virtual private network” service which can change your IP address and hide your actual geographic location.
There are many VPN service providers; you can have a look on best reviews of VPN from the next link: