Questions tagged [ufw]

Uncomplicated Firewall (ufw)

The default firewall configuration tool for Ubuntu is ufw (Uncomplicated FireWall). Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled.

Enabling ufw is recommended at a minimum if not using other firewall tools with the command:

sudo ufw enable

By default, the policy is set to block all inbound requests. To learn more, use the command:

man ufw

where the full manual page is presented.

761 questions
129
votes
5 answers

See configured rules even when inactive

I'm wondering if it's possible to get UFW to list the configured firewall rules even when it's not enabled. I only have ssh access to the server at this time, and I don't want to enable UFW if there's not a rule configured allowing ssh. However,…
Bryan
  • 2,377
112
votes
11 answers

Uncomplicated Firewall (UFW) is not blocking anything when using Docker

This is my first time setting up an Ubuntu Server (14.04 LTS) and I am having trouble configuring the firewall (UFW). I only need ssh and http, so I am doing this: sudo ufw disable sudo ufw reset sudo ufw default deny incoming sudo ufw default…
ESala
  • 2,911
82
votes
5 answers

Why is the firewall disabled by default?

Why is ufw firewall included in Ubuntu, when it is not enabled and pre-configured by default? Most users don't even know it is there, because no GUI frontend is provided.
6205
  • 941
74
votes
5 answers

How can I open a range of ports in ubuntu using (g)ufw

I have to open up a group of ports. Adding the single ports to (g)ufw was easy enough but I can't work out how to open the range 11200-11299. How do I do that?
Pieter Breed
  • 1,005
60
votes
2 answers

how do you create an app profile for ufw?

Ufw has a command that lists out profiles to which you can further explore their profile definitions $ ufw app list And $ ufw app PROFILE {app profile title} I was wondering how you can create a profile for an undefined program, like virtual box…
Miphix
  • 1,078
48
votes
3 answers

potential ufw and fail2ban conflicts

Will running both fail2ban and ufw cause problems? I noticed that fail2ban modifies iptables rules, but ufw already has a ton of iptables rules defined... so I'm not sure if fail2ban will mess these up.
Adam Monsen
  • 2,161
47
votes
6 answers

Is there a way to keep UFW logging out of dmesg?

There are comments in the /etc/rsyslog.d/20-ufw.conf file that give you the option to keep UFW-events from being logged to the kernel and message logs, which i have done. I would really like to get UFW-events out of the dmesg as well, but how to…
44
votes
4 answers

How to configure UFW to allow IP Forwarding?

I have UFW, OpenVPN and Virtualbox installed on my home server. I have a host-only network for my virtual machine guests (vboxnet0) set up with the IP range 10.0.1.0, and another IP range of 10.0.0.0 configured on the other end of the OpenVPN…
Stephen RC
  • 4,920
40
votes
2 answers

Why I'm getting this [UFW BLOCK] in my syslogs?

I wonder why I get this error on my syslogs: [7732763.396193] [UFW BLOCK] IN=eth0 OUT= MAC=02:8b:1a:75:d5:7b:02:8b:1a:40:00:03:08:00 SRC=x.x.x.x DST=x.x.x.x LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=53703 DF PROTO=TCP SPT=35651 DPT=8443 WINDOW=457…
batman
  • 8,071
37
votes
6 answers

Open port 80 on Ubuntu server

I'm just starting out in Ubuntu/Linux, and have some trouble opening port 80 for incoming connections. I ran the sudo ufw allow 80/tcp command, and when I run sudo ufw status the result looks like this: Status: active To …
martin
  • 481
  • 1
  • 4
  • 5
32
votes
1 answer

ufw delete all rules

I'm trying to understand and build my own firewall for the first time. I'm very new to this kind of things. I came up to ufw and added some rules to test it. Is there any way of deleting all the rules at once with a single command?
user658776
31
votes
1 answer

Understanding UFW log

What does this UFW log mean? Has already asked a similar question, but I want to know explicitly what each line of the UFW log means Feb 6 16:27:08 jonasgroenbek kernel: [71910.873115] [UFW BLOCK] IN=eth0 OUT=…
30
votes
6 answers

UFW firewall still blocking SMB despite adding rules

I have an Ubuntu PC with ufw firewall (GUI version). I have added the preset Samba service, in and out, and even tried adding the ports manually (135-139, 445, UDP and TCP, in and out), but it still blocks samba. I am trying to access a share on…
nLinked
  • 3,387
29
votes
5 answers

UFW is blocking all even when I set rules to allow

I am using an ubuntu server, Now I am trying to enable the firewall using these commands: ufw default deny incoming ufw default allow outgoing ufw allow ssh ufw allow www ufw allow https ufw enable I've also tried making the ufw default deny…
engma
  • 393
29
votes
5 answers

Redirect UFW logs to own file?

Is there a way I can easily redirect the entries for UFW to their own log file at /var/log/ufw instead of filling up /var/log/syslog as it's becoming tricky to find solutions to problems with all this UFW stuff flying past me?
markrich
  • 1,441
1
2 3
50 51