Questions tagged [ufw]

Uncomplicated Firewall is a firewall configuration tool for Linux. It acts as a frontend to iptables. Originally designed for Ubuntu, it is available on many Linux distributions.

Uncomplicated Firewall is a firewall configuration tool for Linux. It acts as a frontend to iptables. Originally designed for Ubuntu, it is available on many Linux distributions.

458 questions
57
votes
2 answers

Where are the logs for ufw located on Ubuntu Server?

I have an Ubuntu server where I am blocking some IPs with ufw. I enabled logging, but I don't know where to find the logs. Where might the logs be or why might ufw not be logging?
blockhead
  • 831
  • 1
  • 8
  • 13
53
votes
5 answers

Where does UFW (uncomplicated firewall) save command-line rules to?

You add a rule like this: ufw allow 22/tcp The rule is saved, and is applied even after reboot. But it's not written anywhere in /etc/ufw. Where is it saved to? (Ubuntu, using ufw as pre-installed.)
Steve Bennett
  • 5,539
  • 12
  • 45
  • 57
50
votes
3 answers

Ubuntu ufw: set a rule on a per interface basis

I want to create a rule that allows anyone on eth1 to access port 80. Can UFW do this or should I go back to using Shorewall? To clarify: this is a capabilties question, can ufw handle interfaces as a target?
Antonius Bloch
  • 4,480
  • 6
  • 28
  • 41
42
votes
3 answers

UFW Firewall Rules ordering?

I have the following rules on our server within UFW: To Action From -- ------ ---- 22 ALLOW 217.22.12.111 22 ALLOW …
dannymcc
  • 2,677
  • 10
  • 46
  • 72
39
votes
2 answers

Can I use ufw to setup a port forward?

Im currently using ufw to enforce some basic firewall rules. Is it possible to also use ufw to do port forwarding? Specifically im wanting to forward incoming traffic to my server (same machine running ufw) on port 80 to port 8080. (http traffic…
tinny
  • 461
  • 2
  • 5
  • 11
29
votes
4 answers

Rate limiting with UFW: setting limits

UFW's man page mentions that it can setup iptables rate limiting for me: ufw supports connection rate limiting, which is useful for protecting against brute-force login attacks. ufw will deny connections if an IP address has…
Tom
  • 601
  • 2
  • 8
  • 15
29
votes
4 answers

Copy UFW rules between servers

I'm doing a hardware refresh on a my Colo, I just need to copy my UFW rules from my old server to my new server. I dont seem to be able to get them copy all the active rules from my old server to my new one. How do I copy my active UFW rules…
Squidly
  • 1,685
  • 1
  • 14
  • 18
27
votes
3 answers

UFW Enable requires y prompt, how to automate with Bash Script?

I'm trying to automate the setup of UFW on an Ubuntu 16.04 instance. However when I type: sudo ufw enable I get prompted to enter yes or no, is there a way to feed it yes or set it automatically to start without getting stuck with a prompt?
Adron
  • 564
  • 1
  • 7
  • 16
25
votes
4 answers

UFW comment existing rule?

I'm trying to comment an existing ufw firewall rule, but I can't find the exact command I can easily add a rule with comment like: sudo ufw allow in on eth0 to any port 80 comment 'test' But how do I comment an existing rule?
Emax
  • 385
  • 1
  • 3
  • 8
24
votes
3 answers

Debugging iptables and common firewall pitfalls?

This is a proposed Canonical Question about understanding and debugging the software firewall on Linux systems. In response to EEAA's answer and @Shog's comment that we need a suitable canonical Q&A for closing common relatively simple…
HBruijn
  • 72,524
  • 21
  • 127
  • 192
23
votes
2 answers

UFW on Ubuntu to Allow All Traffic on LAN

I want to allow all LAN traffic to my Ubuntu server. I have read the documentation and see the command, but when I try to edit the command for my IP range I get an error. How can I allow all traffic starting at 192.168.15.0 - 192.168.15.255? sudo…
Christopher Altman
  • 729
  • 3
  • 11
  • 20
20
votes
1 answer

Should I be using iptables or ufw?

I know of iptables. I know of ufw. I've been using ufw in the past just because it's easier to setup and use. However, which one should I be using? Is iptables more secure? Is ufw more stable? I have no idea, hence why I'm asking here.
Piers Karsenbarg
  • 538
  • 3
  • 12
  • 24
18
votes
1 answer

Why is ping working when all incoming and outgoing connections are blocked in the firewall?

I have DENIED both incoming and outgoing connections using ufw on Debian VPS. There is only one rule defined, which is to allow connection to SSH port. ufw is enabled and working. Yet I am still able to ping from my laptop to server using its…
Frank Martin
  • 721
  • 2
  • 10
  • 23
17
votes
2 answers

Docker breaks libvirt bridge network

This issue is driving me crazy. I run a fresh install of Ubuntu 18.04, with: ufw to manage the firewall a br0 bridge lxd and libvirt (KVM) I tried stock docker.io package and packages form docker's own deb repository. I want o be able to deploy…
Laurent
  • 286
  • 2
  • 11
17
votes
1 answer

Check ufw default policy action

I know it's very easy to set the default behavior of ufw, e.g. ufw default deny, but how do I check what the default POLICY action is? It does not show in ufw status.
Sarke
  • 371
  • 1
  • 3
  • 12
1
2 3
30 31