formats

ufw Allow From Specific IP on Specific Port

Published on October 10, 2011, by + in sysadmin.



ufw is the friendly command line firewall utility in Debian and Ubuntu.

I’ll show you how to create a specific rule syntax for allowing traffic in from a specific ip on a specific port.



Say for example you want to allow traffic from 192.168.1.215 on udp port 88.



Here is the command:

$ sudo ufw allow from 192.168.1.215 proto udp to any port 88





You can view your current rules with:

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
88/udp                     ALLOW       192.168.1.215





To delete this rule, preface the command with delete:

$ sudo ufw delete allow from 192.168.1.215 proto udp to any port 88





Cool!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home sysadmin ufw Allow From Specific IP on Specific Port