|GUIDE| How to close/open ports with ufw (Ubuntu Fire Wall)

Status
This thread has been locked.

ItzStraafeyy

Feedback score
0
Posts
9
Reactions
0
Resources
0
Hello,
Well here is a quick guide for you guys that you don't know how to close and open ports on ubuntu with ufw (Ubuntu Fire Wall) for this you will need any version of Ubuntu.
okay, let's get started!

Step 1: Before you do anything check the status with command "sudo ufw status"
Step 2: Do "nano vi /etc/default/ufw" and then find IPV6=yes you need to replace yes with no it's safer...
Step 3: Then do "sudo ufw default deny incoming" and "sudo ufw default allow outgoing"
Step 4: Okay so now you will need to allow ssh port :D you can do this with "sudo ufw allow ssh"
Congratz now you opened ssh port for ftp and ssh thingy
Step 5: Well now you need to enable ufw do this with "sudo ufw enable" you can also disable it with "sudo ufw disable"
*Opening ports*
Well, thats the easiest step :p
Commands
To open/close port do "sudo ufw allow/deny 25565/tcp or udp"
To delete rule do "sudo ufw delete allow/deny 25565/tcp or udp"
To open ports 500 through 700 do "sudo ufw allow 500:700/tcp or udp"
Here is also thing to lock your ftp and ssh to your home ip but you need to have STATIC IP you can do this with "sudo ufw allow from 192.168.255.255"

Well, i hope you find this guide useful :D
 
Status
This thread has been locked.
Top