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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
13 views

Meaning of fields in ip6tables logs

I am parsing ufw logs, and running into limitations with the documentation that I am able to find for the ip6tables entries for ufw. This very nice blog post describes the iptables format well, but ...
user avatar
0 votes
0 answers
26 views

Ubuntu Server - UFW blocking JupyterHub and other services on Microk8s

I've setup Microk8s via snap and JupyterHub by following the steps from zero-to-jupyterhub. However I cannot access JupyterHub via the browser and I think the reason that UFW is blocking the ...
user avatar
0 votes
1 answer
20 views

UFW Masquerade and outside traffic only on specific interfaces

I have a Ubuntu system (192.168.A.B) that is running as a Wireguard "server" with 2 tunnels with the following networks and UFW rules: Network 10.255.200.0/24 ufw allow XXX/udp && ...
user avatar
  • 103
1 vote
0 answers
30 views

Trying to forward port 53658 on my openvpn server

i am attempting to forward a port on my OpenVPN server hosted in the cloud. I am currently using transmission to download torrents, and have it set up against a self hosted OpenVPN server running ...
user avatar
  • 11
1 vote
0 answers
20 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 ...
user avatar
1 vote
1 answer
15 views

Why does traffic continue to flow through my gateway despite a firewall rule blocking all outbound traffic addressed to it?

While messing around in a qemu guest I discovered something very peculiar. If I set the system firewall to reject all traffic to my gateway (10.0.2.2), the firewall only rejects traffic destined to ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
  • 1
0 votes
0 answers
14 views

UFW disallow all connection except for VPN and USB LTE modem

I have RaspberryPi with Raspbian and UFW. I successfully disabled all external connections from and to Rpi by: udo ufw default deny outgoing sudo ufw default deny incoming sudo ufw allow out to <...
user avatar
  • 283
0 votes
0 answers
38 views

How to reset the firewall configuration in a persistent manner?

Internet works, ping 192.168.1.4 which is for sure of an Android device does not. I believe it is an issue of the firewall programs. $ ping 192.168.1.4 PING 192.168.1.4 (192.168.1.4) 56(84) bytes of ...
user avatar
0 votes
2 answers
90 views

ufw not logging all connections as expected

I am trying to setup logging on ubuntu server 20.04.4 using ufw, but I'll take non-ufw advice as well. I am running a test https server on port 20000 and want to log all connections to it. Here's what ...
user avatar
  • 19
0 votes
1 answer
88 views

Setting up Port forwarding on Ubuntu 21.10 with OpenVPN (homerouter port forwarding not working)

I'm trying to setup port forwarding on my local workstation, since the home router is not capable of doing the port forwarding I went on with privateVPN. The privateVPN is configured on OpenVPN with ...
user avatar
  • 1
0 votes
1 answer
72 views

Why ufw blocks the access when rules specifically allowing it exist?

$ufw status numbered Status: active To Action From -- ------ ---- [ 7] Anywhere ALLOW IN 192.168.0.0/24 # ...
user avatar
  • 575
0 votes
1 answer
67 views

How can I block a port being used by docker?

I am running wikijs on port 8080 running reverse proxy with apache. With cloudflare argo tunnel so only specific people can login to wikijs. So if user try to browse http://publicip:80 (port being ...
user avatar
  • 1
0 votes
1 answer
183 views

Why didn't ufw block website?

I am using Debian 11 bullseye. I am trying to block some IPs by using ufw firewall. I have installed ufw package. Then I added some simple rules and start ufw by sudo ufw enable Then I checked its ...
user avatar
0 votes
0 answers
19 views

UFW Block message (level 4) on command line even with console loglevel 1 or 0

I didn't want to ask because I'm afraid of downvotes ... but the next step of research would be reading the code of netfilter. Eventually some of you discovered such issues or has an idea where to ...
user avatar
1 vote
0 answers
199 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 ...
user avatar
0 votes
1 answer
148 views

ufw won't allow connections to postgres port 5432

With ufw disable on remote postgres system i'm able to connect from my local system However, the connection does not work when I ufw enable as shown below: C:\Users\HOME>telnet 80.240.24.195 5432 ...
user avatar
  • 297
0 votes
1 answer
50 views

Ufw, allow in/out on enp0s3 192.168.0.0/16

is it possible work ufw to allow in and out on a specific interface AND ip range at the same time? ufw allow in/out from enp0s3 192.168.0.0/16 ? e.g allowing everything on local network, but only ...
user avatar
1 vote
1 answer
37 views

How do I start Ubuntu's ufw before fail2ban to solve a loss of connectivity issue?

My skill level configuring systemd is more of a newbie and need help as I've now hit a road block and I'm stuck. I have fail2ban and ufw installed on a Raspberry Pi clone board. The problem I've ...
user avatar
  • 33
0 votes
0 answers
31 views

Does UFW have overhead limitations?

I have set up a Honey Pot on our system that adds a UFW rule every time someone hits it, as this specific file does in fact exists, however is disabled, has no use to us, or anyone else, and is a ...
user avatar
  • 182
1 vote
1 answer
48 views

How to allow packets for WS-Discovery (onvif)?

I have a Linux machine with ufw firewall, a program runs WS-Discovery that works as intended when ufw is disabled but fails to return anything when it is enabled, what I tried without success: ...
user avatar
0 votes
0 answers
20 views

ufw allowing all connections even though rule doesn't allow it

I just setup ufw on my Pi and allowed only sudo ufw allow <my_selected_ipv6>. I also setup sudo ufw default allow outgoing and sudo ufw default deny incoming. Additionally, I limited http and ...
user avatar
  • 13
0 votes
1 answer
118 views

Ufw allow app: ERROR: Need 'from' or 'to' with 'app'

I am using Ubuntu 20.04.3 LTS, although this question is probably not specific to Ubuntu but to any system using ufw. I am setting up a rule for VNC vino connections. I meant to do that via a ...
user avatar
0 votes
0 answers
62 views

UFW denying all connection after configuring [Debian 11]

I have a new Debian 11 server and installed UFW on it. I'm not new to UFW, but somehow I can't get it to work this time. I have configured UFW to allow incoming SSH connections and Http/https, but all ...
user avatar
  • 1
-5 votes
2 answers
75 views

I want to execute this bash script but failed

This script is used to adding new ufw rules with the container name without re-typing the container name again. It uses grep to get container name. This is the bash script: #!/bin/bash echo -e "\...
user avatar
  • 1
0 votes
1 answer
190 views

Does UFW reset iptables on reboot?

I connected to my remote Linux server to adjust my network settings, but I accidentally changed some rules using iptables instead of my preferred method, ufw. I added the rules in ufw and then ran ...
user avatar
  • 103
0 votes
0 answers
99 views

UFW settings and iptables. Which chain is ufw adding rules at?

I've installed lxc and was looking through iptables because of a network issue. And this was the output Chain ufw-user-input (1 references) pkts bytes target prot opt in out source ...
user avatar
2 votes
1 answer
166 views

Uncomplicated Firewall (UFW) configuration problems on CentOS 8

I've installed UFW (Uncomplicated Firewall) from the EPEL repo. When I try to allow connections to a non-default SSH port using ufw allow 22022/tcp, it fails with: ERROR: problem running The same ...
user avatar
2 votes
1 answer
108 views

Is my firewall configured OK?

$ systemctl status ufw ● ufw.service - Uncomplicated firewall Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled) Active: active (exited) since Sun 2021-10-03 15:43:...
user avatar
0 votes
0 answers
26 views

Set up an IP whitelist programatically on a Linux server

I am fairly new to Linux I have a situation where only registered website members should be allowed to access the server when attempting to login. What I need to do is whitelist an IP automatically ...
user avatar
1 vote
5 answers
1k views

UFW not allowing to boot debian 11

I installed debian 11 on dell 5505 SE and installed UFW. But when I start my pc it shows "a start job is running for Uncomplicated firewall (xxx min / nolimit)". And goes on.. I restarted ...
user avatar
  • 31
0 votes
1 answer
182 views

Ubuntu 20.04.x errors using CIS Ensure loopback traffic is configured UFW security configuration

I’ve only been Linux for about eight months now. I mostly have my head around what’s going on but please when you answer assume I’m far from an expert. I have been attempting to write a lockdown ...
user avatar
0 votes
0 answers
97 views

How to deny traffic to and from all devices on LAN except Internet Gateway with UFW?

On a local network with range 192.168.0.0/24 and a router with fixed IP 192.168.0.1, how can you configure one specific computer (needs Internet access) to deny communication from and to all other ...
user avatar
0 votes
0 answers
16 views

Some app is unable to connect on specific port or at all while firewall is disabled

I've strange issue and I cannot deal with it by self. I'm owning dedicated server from rent company. I'm hosting on it few applications, well many, for example standard apache2 web server or teamspeak ...
user avatar
0 votes
1 answer
217 views

Ufw allow http traffic out

I have a server machine with ubuntu 20 on wich i've installed ufw, this are my rules To Action From -- ------ ---- 22/tcp ...
user avatar
  • 101
0 votes
0 answers
74 views

Linux UFW on client over NFS disrupts network connection

I have a client that boots its rootfs over NFS. The client is connected to the Internet gateway and as such I'm setting ufw on the client to allow connections from the LAN/host. What happens is that ...
user avatar
  • 141
0 votes
0 answers
193 views

UFW and its dependency for iptables, ipv4 and ipv6

Hi all Linux Noob here, I am trying to include UFW (uncomplicated firewall) in my custom Linux kernel 4.1.15 for imx6 series board, but I am getting some errors when configuring and enabling the UFW . ...
user avatar
0 votes
0 answers
24 views

Routing incoming connections with ufw

I would like to setup a non-standard port (for instance, 12345) to redirect its incoming connections to port 25 by using ufw. Here is my current ufw configuration: 12345/tcp ALLOW IN ...
user avatar
0 votes
0 answers
85 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 ...
user avatar
0 votes
1 answer
504 views

UFW - Allow SSH in custom port

I'm new to ufw, and followed this link and entered exact command as instructed. ufw allow ssh 2222 Since my SSH is 2222, I want to add that rule in, but I kept getting ERROR: Need 'to' or 'from' ...
user avatar
  • 372
0 votes
0 answers
29 views

Why am I unable to run UFW?

A few weeks ago, out of curiosity, I disabled ufw and started using firewalld. I want to start using ufw again, but as you can see in the screenshot, systemctl status ufw outputs "active (exited)&...
user avatar
0 votes
0 answers
48 views

Why are UFW rules bak'd when start on boot is enabled?

Yesterday I noticed the firewall was down for my Debian server (Buster, 2020-10) and all of my rules were no longer present (as per $ sudo ufw status). Ok. Lesson learned. At first I thought the rules ...
user avatar
  • 563
0 votes
1 answer
26 views

Ports not connecting, yet I still have Internet access

I'm currently working on a computer where I'm hosting a website as well as an SSH server. However, when connecting via SSH I receive: ssh: connect to host [ip] port 22: Connection refused In addition,...
user avatar
4 votes
1 answer
3k views

UFW blocks DHCP

I am on Debian Buster. I have two network devices in my server. Wifi which is connected to the internet, and a ethernet card which is connected to a small intranet at home. I have installed dnsmasq, ...
user avatar
-1 votes
2 answers
149 views

Blocking outgoing requests to specific domains e.g. facebook, twitter

I'm finding that Firefox and Chromium are both ignoring my /etc/hosts file. Is there a way for me to block all outgoing requests to a particular set of domains e.g. Facebook.com and Twitter.com. For ...
user avatar
  • 155
0 votes
1 answer
2k views

UFW how to log packets allowed by a certain rule?

I noticed that GUFW has the ability to turn logging on and off by rule, but I see no options with ufw -h that I can turn logging on for a rule On ubuntu: To Action From -- ...
user avatar
  • 87
0 votes
0 answers
41 views

Something is modifying my iptable, can it be traced?

I've got the following command in my iptable: -A FORWARD -o enp0s3 -j ACCEPT That somebody doesn't like, because after 2 reboots, it's gone from the iptable... I've got iptables-persistent installed, ...
user avatar
0 votes
1 answer
1k views

Can UFW work with iptables-persistent?

I used a script to set up iptables rules and then made them persistent with iptables-persistant. This is described here as a means to prevent a certain user sending traffic over eth0 so it can just ...
user avatar
  • 295
0 votes
1 answer
629 views

UFW is not blocking outgoing ipv6 pings

I'm trying to set up UFW to block outgoing connections, except on a specific interface, and also except for a specific IP. Everything seems to be working as expected, except I can still send pings to ...
user avatar
  • 105
0 votes
0 answers
45 views

UFW rules not working as expected

This is how the UFW configuration looks like in my Raspberry PI Status: active To Action From -- ------ ---- 1194/tcp ALLOW ...
user avatar