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
27 views

Enable NAT with TCPMSS using UFW

I could enable NAT using UFW with following configuration. *nat :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 192.168.141.0/24 -o ens192 -j MASQUERADE COMMIT If I want to enable TCPMSS, I have to run ...
yananet's user avatar
  • 31
0 votes
1 answer
44 views

Cannot connect to wifi hotspot while vpn is turned on

I am using warp-cli (cloudflare vpn) and after I enable the vpn, I cannot connect any new devices to the wifi-hotspot. Existing connected devices stay connected while vpn is turned on but no new ...
Tuhin Garai's user avatar
1 vote
2 answers
154 views

UFW not blocking connection

I am using the Cloudflare IPv4 and IPv6 lists to block all connections to my server from any IP that is not owned by Cloudflare. When I run sudo ufw status on the server I get: Status: active To ...
Just a nice guy's user avatar
0 votes
0 answers
273 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
  • 1
0 votes
0 answers
17 views

UFW: Blocking IP with ALLOW IN

What is going on here? UFW is blocking 10.0.0.150 when rules, as I understand, allow the connection. Host is 10.0.0.170 [UFW BLOCK] IN=usb01 OUT= MAC=00:e0:4d:6c:5c:0b:78:e7:d1:ca:02:9e:08:00 SRC=10....
Stephen Boston's user avatar
0 votes
0 answers
22 views

ufw logging : how to divert log statements to dedicated file

I have set my ufw logging to 'high' which puts a lot of logging to the general journalctl. Is there a way of setting ufw log output to its own file?
Stephen Boston's user avatar
0 votes
1 answer
136 views

UFW Block in Syslog - Why are many different IPs trying to connect to my server

first of all I want to clear up that I'm not a network expert and just trying to understand things. I hope I can find help here and get a bit smarter.. I'm hosting a service on a Ubuntu 22.04 vps. ...
mojo_x's user avatar
  • 1
0 votes
0 answers
114 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
29 views

ufw how login to proxy server to a nologin

can you tell me how I can allow if I have activated ufw but I have a dynamic ip and I have to set a nologin to be able to enter the server, how do I allow the proxy connection to nologin? the program ...
john's user avatar
  • 1
0 votes
0 answers
63 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
  • 489
0 votes
1 answer
139 views

UFW not fully loading rules on startup

I have a server with default deny and several UFW rules. UFW is enabled on startup (systemctl enable UFW). When I reboot only some of the rules don't get applied properly and I can't access some ...
Mike's user avatar
  • 113
1 vote
1 answer
123 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
1 answer
100 views

How to link Ausweisapp2 with Smartphone app

I cannot link my Ausweisapp2 to the app on my smartphone (app for german eIdentity service). Installed via snap: sudo snap install ausweisapp2-ce In the app, there are no available devices shown. ...
pLumo's user avatar
  • 22k
0 votes
1 answer
743 views

Why can't apt find my desired version of iptables?

I am trying to install version 1.6.2 of iptables in ubuntu 22.04. (Please note: This is about iptables 1.6.2. I have no trouble installing iptables 1.8.7, but I need 1.6.2.) root@924516f76c4c:/var/...
arnoldbird's user avatar
0 votes
0 answers
246 views

UFW won't enable

I cannot get UFW to start on raspbian bullseye The error log when sudo ufw enable: Traceback (most recent call last): File "/usr/sbin/ufw", line 115, in <module> ui = ufw....
Mart's user avatar
  • 101
0 votes
0 answers
115 views

UFW seems to be ignoring allowed ports in specific cases - Solved

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
1 vote
2 answers
76 views

Are these attack attempts to my PC stopped by ufw?

The router re-directs several ports to my PC. I checked ufw.log and found many entries that look like attacks from other countries. I checked the IP and they are reported as abusive/ hacking. These ...
daniel_hck's user avatar
2 votes
1 answer
366 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 vote
0 answers
42 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
0 votes
0 answers
96 views

Establish VPN connection before UFW Firewall is enabled by modifying systemd service files

I want to route traffic through a tun interface established by an OpenVPN client on a debian container that also has UFW firewall rules to prevent IP leaking through the passed through eth interface ...
djhango's user avatar
1 vote
1 answer
471 views

Why is UFW blocking acces to SSH via Wireguard?

192.168.100.50 is connected to 192.168.178.20 over the internet via wg0 interface. wg0 is opening up the tunnel 10.102.242.1/24. The wireguard client interface has 10.102.242.2. Through a static route ...
bomben's user avatar
  • 417
1 vote
1 answer
391 views

Weird network traffic on Ubuntu 22.04

I noticed abnormal network activity when trying to test something and I can't find what program is the culprit. Wireshark: My local IP is 192.168.100.5 I tried to inspect with sudo netstat -latpen ...
weirdnoddle's user avatar
0 votes
0 answers
47 views

How UFW works - Default Rules vs Explicit Ones

I am looking for some confirmation when it comes to exact way UFW (Uncomplicated Firewall) is working on Linux. I believe I get it. However, I was not able to find any official source, which would ...
MTP's user avatar
  • 1
1 vote
0 answers
88 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
998 views

ufw blocks communication between docker containers

I have setup two docker containers for a Magento instance and a redis instance. For now, I only want to allow certain IP addresses to access the website, so I enabled ufw and added some entries. The ...
Comforse's user avatar
  • 600
0 votes
0 answers
110 views

Logging Outbound TCP-SYN packets with UFW

I'm hoping to harden security by implementing strict rules on outbound connections. But as a first step I'd like to audit outbound connections. I'm failing to find the UFW equivalent to something ...
VagrantPaladin's user avatar
1 vote
1 answer
212 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
2 votes
1 answer
651 views

Opening a protocol (112, vrrp) with Ubuntu 20.04 ufw to allow multicasting

I've been installing keepalived on my Ubuntu 20.04 box however for VRRP to work (using multicast) I need protocol 112 opened up on the firewall (note this is a protocol, not a port). From everything I'...
Marcos's user avatar
  • 21
0 votes
1 answer
239 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
2 votes
1 answer
3k views

ufw "command not found"- but as the root user!

My Debian 11 VPS is running now for about 2 weeks- and today I just wanted to analyse, why my traffic is ~70GiB (counted by bashtop). So somewhere in the net I read about nethogs, that this could help....
ubuntu4life's user avatar
0 votes
0 answers
290 views

Docker and UFW exposing internal ports

When I first installed Docker and UFW on my Raspberry Pi 4 two years ago, I stumbled across this post: How to fix the Docker and UFW security flaw Last weekend I reinstalled my Raspi and switched to ...
mu88's user avatar
  • 113
1 vote
1 answer
2k views

Why am I getting connection refused with IP address even though it works with localhost and firewall is open?

When I run sudo ufw status on a Ubuntu box, I get the following output sudo ufw status Status: active To Action From -- ------ ---- 22/tcp ...
Finlay Weber's user avatar
0 votes
1 answer
2k 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
  • 185
0 votes
1 answer
135 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 ...
Jennifer's user avatar
0 votes
1 answer
2k 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 && ...
MorRich's user avatar
  • 103
1 vote
0 answers
130 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
1 answer
79 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 ...
Tenders McChiken's user avatar
0 votes
0 answers
1k 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
0 votes
2 answers
846 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 ...
Dr Phil's user avatar
  • 139
0 votes
1 answer
364 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 ...
avman's user avatar
  • 1
0 votes
2 answers
448 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 # ...
Adrian's user avatar
  • 639
0 votes
1 answer
343 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 ...
JRA's user avatar
  • 1
0 votes
1 answer
1k 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
2 votes
0 answers
2k 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
0 votes
1 answer
1k 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 ...
Ashar's user avatar
  • 417
0 votes
1 answer
138 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 ...
Adam Larsson's user avatar
1 vote
1 answer
111 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 ...
Myron's user avatar
  • 33
1 vote
1 answer
246 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: ...
Ernest Dujo's user avatar
0 votes
1 answer
3k 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 ...
sancho.s ReinstateMonicaCellio's user avatar
-5 votes
2 answers
686 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 "\...
Zann's user avatar
  • 1

1
2 3 4 5