User Tools

Site Tools


ufw_arguments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ufw_arguments [2016/07/24 20:27] walkeradminufw_arguments [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 27: Line 27:
 Let’s look at the limit option. If you have any reason for concern that someone might be attempting a denial of service attack on your machine, via port 80. You can limit connections to that port with UFW, like so: Let’s look at the limit option. If you have any reason for concern that someone might be attempting a denial of service attack on your machine, via port 80. You can limit connections to that port with UFW, like so:
 sudo ufw limit 80/tcp sudo ufw limit 80/tcp
 +\\ 
 \\  \\ 
 By default, the connection will be blocked after six attempts in a 30-second period. By default, the connection will be blocked after six attempts in a 30-second period.
 +\\ 
 \\  \\ 
 You might also have a need to allow outgoing traffic on a certain port but deny incoming traffic on the same port. To do this, you would use the directional argument like so. To allow outgoing traffic on port 25 (SMTP), issue the command: You might also have a need to allow outgoing traffic on a certain port but deny incoming traffic on the same port. To do this, you would use the directional argument like so. To allow outgoing traffic on port 25 (SMTP), issue the command:
 +\\ 
 \\  \\ 
         sudo ufw allow out on eth0 to any port 25 proto tcp         sudo ufw allow out on eth0 to any port 25 proto tcp
 +\\ 
 \\  \\ 
 You could then add the next rule to block incoming traffic on the same interface and port: You could then add the next rule to block incoming traffic on the same interface and port:
 \\  \\ 
-sudo ufw deny in on eth0 from any 25 proto tcp+        sudo ufw deny in on eth0 from any 25 proto tcp
 \\  \\ 
 \\  \\ 
  
  
ufw_arguments.1469388448.txt.gz · Last modified: 2023/03/09 22:35 (external edit)