Skip to main content

Questions tagged [ufw]

Uncomplicated Firewall (ufw) is a frontend for iptables, works as a host-based firewall and provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall.

79 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
1k views

Ubuntu 22.04 firewalld initiation problem: no python-nftables

I tried to use firewalld instead of ufw, but it keeps showing the following errors even after manually downloading python-nftables through sudo apt install iptables is not being used. $ systemctl ...
Nimbus's user avatar
  • 51
4 votes
1 answer
3k views

How to add multiple user.rules in ufw?

I know you can add rules one by one. But is there a way to add rules in one go - For instance, this is how you add rules in ufw in Debian - $ sudo ufw allow 80/tcp $ sudo ufw allow 443/tcp $ sudo ...
shirish's user avatar
  • 12.5k
3 votes
0 answers
1k views

Why doesn't ufw enforce firewall rules for traffic coming from Virtualbox VM

I've been running Linux Mint 17 on my laptop for a while and thought I had it locked down to not allow any incoming traffic through "Firewall Configuration" (ufw GUI)—I have also validated this from ...
Kristofer's user avatar
  • 293
2 votes
1 answer
4k views

Ubuntu 22.04 iptables command not working

Totally new to netfilter thing, currently am running an application which uses three interfaces eth0/eth1/eth2, my application will run on two servers and they both can communicate between them via ...
RaGa__M's user avatar
  • 169
2 votes
1 answer
654 views

Why am I locked out of my machine with these ufw rules?

I have a server on ip 192.168.1.200 My goals are: I should be able to log in to my server via port 22 from anywhere From inside 192.168.1.200 I should be able to access the Internet via ports 443 and ...
Duke Dougal's user avatar
  • 1,055
2 votes
1 answer
5k views

How to tell which application UFW is blocking

I have a Debian system running ufw. I have "default deny" on all outgoing connections and I open specific communications (ports and/or IP addresses) as needed. I use the dmesg log to see if ...
bitsmack's user avatar
  • 205
2 votes
0 answers
3k views

KVM port forwarding (Ubunto 20.04)

I have a fresh installation of my computer of Ubuntu 20.04.3 LTS. I have installed kvm: sudo apt -y install bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm I have created a new ...
albatros's user avatar
2 votes
0 answers
594 views

Naming / Aliasing IP addresses in UFW

I've set up UFW and things are working great. I want to restrict access to 5 distinct ports for three distinct IPs. Is there a way to either name/alias an IP, or create a group of IPs? Right now I'...
thekevinscott's user avatar
2 votes
1 answer
1k views

OpenVPN or IPtables for split tunnel control?

I have been plugging away but not luck, but from what I understand what I am trying to split tunnel. I have a VPN in place (and working) where all traffic from my LAN heads out to the internet via ...
Matt's user avatar
  • 41
2 votes
2 answers
557 views

Does fwknop play nice with ufw?

The tutorial for fwknop says to block ports with an iptables script. I don't want to use iptables since it's too confusing, I'd rather use ufw. But it seems like ufw does some complicated stuff, so I'...
Superbest's user avatar
  • 487
2 votes
0 answers
786 views

how to forward all UDP traffic to VPN client IP with ufw

I'm using sipgate with freepbx and I've got down to what I presume is the final hurdle with the one-way audio issue. From everything I've read the issue points to NAT. I need to forward all UDP ...
Onimusha's user avatar
  • 113
2 votes
1 answer
642 views

Why does mounting external harddrive trigger a UFW event?

Today I noticed when I plug in my 2TB external Toshiba hard drive, it triggers a ufw event in my logs: Jul 20 11:24:20 linuxbox kernel: [152873.728277] [UFW BLOCK] IN=inet1 OUT= MAC= SRC=xxxa DST=...
jtlindsey's user avatar
  • 333
2 votes
1 answer
901 views

How to properly port forwarding between different machines using UFW / iptables and DD-Wrt?

This is my network I want to see my ip_camera (192.168.3.4:80) from outside my house. It is on dd-wrt router (192.168.3.1) without internet. The router 192.168.1.1 has internet. However, i have a ...
sergius's user avatar
  • 65
1 vote
1 answer
214 views

UFW BLOCK on syslog

I was able to see this "UFW BLOCK" in Syslog at different times. Dec 15 01:22:23 node1 kernel: [4837640.303204] [UFW BLOCK] IN=enp4s2 OUT= MAC=xx:xx:xx SRC=192.168.x.x DST=192.168.x.x LEN=...
Janitha Dilshan Siripella's user avatar
1 vote
0 answers
55 views

Uncomplicated firewall - DEFAULT_FORWARD_POLICY implications?

I don't understand what the function of DEFAULT_FORWARD_POLICY. Is using ACCEPT considered a security risk, if so, why?
user_968563's user avatar
1 vote
0 answers
153 views

Prevent network namespaces / lxd-bridges from talking to each other, but keep internet access?

Following goal: I have lxd containers each set of containers should have their dedicated isolated network each should still be able to connect to the internet (e.g. apt update or curl), but not leak ...
stackbox's user avatar
1 vote
1 answer
683 views

Which process is sending outbound requests?

I recently installed a Ubuntu desktop (only additional programs being google-chrome and VLC). When I enabled UFW and blocked everything outgoing by default, I noticed a bunch of outgoing attempts ...
Dr Phil's user avatar
  • 139
1 vote
0 answers
157 views

UFW is Manually Disabled via Shell - Can the system re-enable it on boot?

Take note i am already aware how to have start the ufw service on boot. This is not what i am asking. So, right now, if i check ufw status it shows as "Active". And when i reboot and check ...
The Stare's user avatar
1 vote
0 answers
394 views

Improving performance of bulk UFW rule updates?

I'm using UFW to block countries like Russia and China that frequently originate hack attempts on my servers. I have files of IP ranges for each country (in CIDR notation) and use the following to add ...
Chris Beach's user avatar
1 vote
0 answers
716 views

How to block ubuntu internet access?

I would like to block internet access in the browser (firefox) but when trying to do it with ufw it simply does nothing, try sudo ufw deny 80 sudo ufw deny 8080 sudo ufw deny 443 but nothing, will ...
Christian Gtz's user avatar
1 vote
0 answers
799 views

UFW blocks port 8443 when I explicitly allow it

For whatever reason, whenever I turn on ufw, it blocks access to port 8443/tcp even though I have it explicitly allowed. For example: [root:test:~/test]# ufw status numbered Status: active To ...
user3447014's user avatar
1 vote
0 answers
1k views

UFW won't start at boot

I've got a little problem with ufw on Raspbian (Debian) on my Raspberry Pi 4 B. I have it as a server with public IP. It looks like it works like it should, but after reboot the ufw is inactive. I've ...
Jiří Štefka's user avatar
1 vote
0 answers
663 views

UFW Drop inbound ICMP requests from outside the local network

How do I use ufw to drop inbound icmp traffic from outside my local network? Local network/mask is 10.0.2.0/24.
Moe's user avatar
  • 11
1 vote
0 answers
294 views

Interpreting UFW log - Brother printer and 239.255.255.250

I'm using UFW and don't know what's going on here. My ufw log has many statements like this: [UFW BLOCK] IN=enp0s25 OUT= MAC=01:00:5e:7f:ff:fa:9c:30:5b:c3:df:c2:08:00 SRC=10.0.0.49 DST=239.255.255....
Stephen Boston's user avatar
1 vote
0 answers
700 views

Purpose of UFW Allow All Rules in FORWARD chain?

What's the purpose of the allow all rules put into the FORWARD chain by UFW? They're currently messing up the 5 ACCEPT rules I've put in place underneath. Unless there's some specific valid reason ...
Evan's user avatar
  • 111
1 vote
0 answers
265 views

Open a port on a google cloud instance without ssh access

After enabling ufw on my google cloud instance running ubuntu, I can't ssh into the instance anymore. I didn't open nor close any port, I only ran: ufw enable and restarted the machine (ufw requires ...
The-null-Pointer-'s user avatar
1 vote
0 answers
257 views

What does this UFW entry mean?

I've found this recent entry in ufw.log: RaspberryPi kernel: [1046588.133562] [UFW BLOCK] IN=wlan0 OUT= MAC=mac_address SRC=0.0.0.0 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 My ...
Matteo's user avatar
  • 570
1 vote
0 answers
227 views

Unable to access http server when ufw is running, on Raspbian?

I have a Raspberry Pi running Raspbian, with Apache2 for the web server. Some recent change seems to have broken my ability to access my web server, when ufw is running. The server simply doesn't ...
Andre M's user avatar
  • 443
1 vote
1 answer
636 views

UFW: Allow traffic only from a dynamic IP on its last 2 elements

I am trying to setup the following rule on ufw: ufw allow from 217.87.123.0/24 So to allow incoming connections from all 217.87.123.* addresses. The problem is that my IP does not always start with ...
johan855's user avatar
  • 123
1 vote
0 answers
318 views

UFW Preventing Web Browsing

I have the following rule set configured using UFW on Debian Jessie 8.2.0: Status: active Logging: on (low) Default: deny (incoming), deny (outgoing) New profiles: skip To ...
hermetik's user avatar
1 vote
0 answers
1k views

ufw firewall - how to only "allow" when I am going through a proxy

I am using a proxy to navigate on internet, and I am trying to setup a firewall that will only let me connect to internet via this proxy: if I forgot to turn on the proxy, that I should not be able ...
mascip's user avatar
  • 111
1 vote
1 answer
705 views

How to safely open ports in ubuntu 22.04 for Cyber Protection Agent

In Ubuntu 22.04, I have installed the Backup Agent for Linux Servers "Cyber Protection Agent" on vps. I have followed this link https://www.ionos.com/help/server-cloud-infrastructure/cloud-...
hous's user avatar
  • 111
1 vote
2 answers
5k views

How to block all incoming and outgoing traffic except outgoing of 80 port and 443 in ufw?

I need to unlock only outgoing 443 and 80 port, only for navigate through internet, actually im using the rules: ufw default deny incoming ufw default deny outgoing ufw allow out from any to any port ...
xixuhuw's user avatar
  • 11
0 votes
0 answers
23 views

VPN kill switch with UFW

You all probably heard of Tunnelvision attack on VPN's. Basically, it is about this: the attacker in rogue LAN abuses DHCP option 121 to set a route on the VPN user’s system that is more specific than ...
Matthai's user avatar
  • 35
0 votes
1 answer
52 views

What configuration is blocking local ssh connections to my server?

So I recently bought a Raspberry Pi to work on a small passion project with the RetroPie Debian-based image. I am now at the stage where I want to completely shield the server only allowing specific ...
Ress's user avatar
  • 1
0 votes
0 answers
24 views

Many UFW BLOCKs pr minute from numerous ports and numerous IP addresses

My syslog is flooded with numerous attacks of some sort coming from multiple sources. I looked at all the other references in the search feature but none addressed tcp and from numerous sources Feb 16 ...
brad's user avatar
  • 207
0 votes
0 answers
40 views

GUWF and firewall malfunctioning?

I keep adding IP addresses to the built-in Linux Mint "firewall" program (which is "GUWF" relabeled "firewall") and it worked for a while ... but now it doesn't look like ...
natS's user avatar
  • 3
0 votes
0 answers
395 views

I am unable to access my HTTP NGINX server over LAN

I have allowed the port in ufw and have the following configuration: server { listen 0.0.0.0:8000 default_server; server_name _; index index.html; access_log /var/log/nginx/html....
RadoslavL's user avatar
0 votes
0 answers
81 views

ufw rule supposed to block traffic but iptables allows it

As a test I wanted to temporarily block access to my website. So, I deleted http/https rules using ufw delete command. ufw is set to default deny incoming. The only remaining rule is the one allowing ...
Faxopita's user avatar
  • 179
0 votes
0 answers
218 views

UFW Active but Not Enabled After System Reboot in AlmaLinux 8.8 (Sapphire Caracal)

I'm encountering an issue with UFW (Uncomplicated Firewall) on my Linux system. After a system reboot, when I check the status of UFW using the ufw status command, it returns that the firewall is ...
Abdulhamid's user avatar
0 votes
1 answer
88 views

I can't block a port with ufw

This morning I received a report from Netscan: Netscan detected from host 8X.19X.1X.1XX time protocol src_ip src_port dest_ip dest_port Fri Sep 15 05:21:59 2023 UDP 8X.19X.1X.1XX 5065 => 9.87.179....
Willy Makend's user avatar
0 votes
1 answer
94 views

IPV6 local UFW BLOCK syslog

The log in syslogs is as follows: [UFW BLOCK] IN=wlan0 OUT= MAC=33:33:00:00:00:01:e8:48:b8:5f:a0:e8:86:dd SRC=fe80:0000:0000:0000:ea48:b8ff:fe5f:a0e8 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=52 ...
Yeh acc's user avatar
0 votes
1 answer
87 views

Firewall : firewalld with docker open port for local service

I'm trying to open port for ssh on non-standard port like 12452, i used these commands and non of them worked iptables -I INPUT -p tcp --dport 12452 -j ACCEPT iptables -I OUTPUT -p tcp --dport 12452 -...
Ebrahim Karimi's user avatar
0 votes
0 answers
192 views

Blocking ssh bruteforcers with ufw

I want to block SSH brute force attacks using ufw. Here is the code to block them: Citing "The Hail Mary Cloud And The Lessons Learned: BSDCan", it could be done: By pf: table <...
somenxavier's user avatar
0 votes
0 answers
23 views

Why do I have log-entries in `/var/log/ufw.log` while my laptop was in standby?

While debugging a network related issue I found these entries in /var/log/ufw.log: $ tail -f /var/log/ufw.log Jun 22 00:07:55 ierbert2 kernel: [217764.254528] [UFW BLOCK] IN=wlp59s0 OUT= MAC=9c:b6:d0:...
packoman's user avatar
  • 151
0 votes
0 answers
641 views

UFW apparently causing SSH to timeout despite specific rule

I'm new to SSH and ufw and would like to understand why one type of rule works between two Linux Mint computers on the same home LAN but another does not seem to work. I just wanted to allow one ...
Puffin's user avatar
  • 101
0 votes
0 answers
220 views

Uncomplicated firewall UFW unintentionally blocking traffic

On a web server (VMware-VM with Ubuntu 18 LTS) with an (externally firewalled) IPv4 address, I did apt-get install --no-install-recommends ufw ufw deny from <some chinese hacker IP> to any # ...
Juergen's user avatar
  • 684
0 votes
1 answer
285 views

UFW seems to be ignoring allowed ports in specific cases

I've got a Raspberry Pi set up with UFW firewall to try and secure it as best as possible. Most of the rules seem to work absolutely fine, but for some reason, it's blocking specific connections which ...
BallistiX09's user avatar
0 votes
1 answer
527 views

Redirecting DNS querries from NAT'd devices and UFW

I'm having a tough time figuring this one out. I have the following network: (Internet)--(firewall) -- (PC1 (Ubuntu 20.04)) -- (PC2 (Fedora, 192.168.0.2)) PC1 has two NICs, (enp4s0) faces the firewall,...
Fratink's user avatar
  • 41
0 votes
0 answers
3k views

Cant connect to my tigervnc server hosted on Ubuntu 20.04.4 LTS

Did some basic debugging. VNC session is created vncserver -list TigerVNC server sessions: X DISPLAY # RFB PORT # PROCESS ID :1 5901 4479 Port 5901 is enabled in firewall sudo ufw ...
tr1via's user avatar
  • 1