Configure the Firewall on Linux

Last updated: Oct 2nd 2020

To make sure that the firewall isn’t blocking Barcode to PC, follow these steps:

Step 1 – Install UFW if you don’t have it

UFW, or Uncomplicated Firewall, is an interface to iptables that is geared towards simplifying the process of configuring a firewall

  • Open a new terminal
  • Type sudo apt-get install ufw -y

Step 2 – Enable UFW

Type sudo ufw enable in your terminal

Step 3 – Add the rules

Type the following commands in your terminal:

sudo ufw allow 57891/tcp
sudo ufw allow 5353/udp

You’re done.

 

If you want to learn more about UFW

Checkout How To Set Up a Firewall with UFW on Ubuntu 16.04 tutorial by DigitalOcean

Alternatively if you prefer to use iptables

Use these iptables commands:

iptables -I INPUT -p tcp --dport 57891 -j ACCEPT
iptables -I INPUT -p udp --dport 5353 -j ACCEPT

then, to make the changes permanent:

iptables-save > /etc/iptables.up.rules

Comments

No comments found. Be the first to leave a comment.

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

Related posts