October 31, 2018 at 3:21 PM #9432
Caezar De Castro IIKeymaster
First is of course installing the firewall package on your Linux server. This can be done by executing the following command.
sudo apt-get install ufw`
Firewall which is ufw is now installed, what you need to do now is start ufw with the following command.
sudo service ufw start
To ckeck status of this firewall, you can just check for its status and avaiable ports open.
sudo service ufw status --verbose
Before you allow or deny any ports or ip or even subnet, first thing first, set the default rule.
sudo ufw default deny incoming
sudo ufw default allow outgoing
Now, to allow specific ports from protocol tcp/udp.
service ufw allow 3000/tcp
service ufw allow 3000/udp
To allow a range of ports, use the following command. To block just change allow to deny.
> service ufw allow 3000:3100
To deny subnet with attackers, usually. Subnet includes range of ip so take note either safe ip or malicious ip is blocked!
ufw deny proto tcp from 126.96.36.199/16 to any
Now, that all things are set, you can now reload your firewall to make use of the new rules previously set. To reload the current firewall new config.
Now, all things set you can now config iptables that you will be using to deal with the networking and security like iptables. See, Server Admin: Basic Manual for Performance and Security forum for more server administration.
You must be logged in to reply to this topic. Login here