Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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.

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

UFW route not responding

Hi i tried to make a server where every software running on it is in a vm. i tried using ufw to route the requests and it worked ... locally. when i tried to connect to one of my vm using a vpn i saw ...
user avatar
0 votes
0 answers
14 views

How can I log the UID in UFW log file permanently?

I have here a debian 10 with installed UFW. I want to know the user or uid of the processes of the connections which are logged by UFW. To log the UID I have add --log-uid to the log rules in /etc/ufw/...
user avatar
  • 929
0 votes
1 answer
23 views

Can't add VPN address to UFW killswitch

I am trying to use UFW as a VPN killswitch as outlined in this guide: https://adamtheautomator.com/linux-killswitch/ So far, I have been successful up to the step where I need to restrict outbound ...
user avatar
  • 101
0 votes
0 answers
18 views

Investigating incoming IP connection issues on Ubuntu VPS

I'm investigation some issues with Stripe webhooks not reaching our test server. According to their docs they submit requests from the following IPs: https://stripe.com/docs/ips#webhook-notifications ...
user avatar
0 votes
1 answer
63 views

Postfix: Couldn't Stop "SASL LOGIN authentication failed" Attack in Mail Logs

I'm trying to stop an attack and logs with SASL LOGIN authentication failed for my mail server. However, I've been trying for a day and am still not able to achieve it. The logs continue to generate ...
user avatar
0 votes
1 answer
31 views

Unable to access one server on network, while able to access others

I am not certain about the terminology; I will try to be as clear as possible but note I might use a word wrong. I have a number of Ubuntu servers, all connected to the same network. I can access each ...
user avatar
0 votes
1 answer
15 views

Weird ESTABLISHED connections from multiple IP's to my server through ports I already configured my firewall to deny access from

I have a server running Debian 10 and I use "ufw" as my firewall tool, I used it to open few ports only 80,443,22 I tried to execute "netstat -na" to see if any unauthorized ...
user avatar
0 votes
0 answers
36 views

UFW blocking interface even though it is allowed

I am running Ubuntu 20.04 with wireguard and Kubernetes. Traffic between nodes is going through wireguard interface wg0. No matter what I do some traffic is being blocked by UFW. I have the following ...
user avatar
0 votes
0 answers
30 views

ufw - how can i add custom rules in iptables-save syntax correctly?

So when i do iptables -A ufw-user-forward -s 172.0.0.0/8 -d 10.0.0.0/24 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A ufw-user-forward -s 172.0.0.0/8 -d 10.0.0.0/24 -j DROP one by one in ...
user avatar
  • 1
0 votes
2 answers
115 views

How is IPsec (strongswan) working without opening ports in UFW?

I needed to setup a site-to-site VPN between servers A and B, where server A is being managed by me and server B is being managed by a client. Server A is running Ubuntu 20.04 and I am using ...
user avatar
  • 165
0 votes
0 answers
22 views

setting a massive list of blocking rules from ip list or a better way to do things?

ok so almost similar has been asked before but slight differences i have a homelab server i bought to learn and its ended up doing a few services. one of those is a media server, and since i want it ...
user avatar
0 votes
0 answers
56 views

Iptables Qemu KVM

i've VM on Qemu on my server, i habitually use UFW but with Qemu is not possible to use UFW (When i drop any from virtual interface, not working), but i can use IPTABLES (Or Other). How can i block ...
user avatar
  • 1
0 votes
0 answers
43 views

How do I use UFW to block a device in Ubuntu hotspot?

I have a laptop running Ubuntu 20.04, which connected to the internet via ethernet. I have setup a WiFi hotspot on this machine, so that I can share its internet connection. Say, I have third device (...
user avatar
  • 3
0 votes
1 answer
73 views

ufw configuration for smtp connections

I have a PHP application running on a Debian server with UFW as firewall. The application needs to connect to a SMTP to send mails. It works when I disable UFW. When it's enabled, the PHP application ...
user avatar
0 votes
1 answer
26 views

Can't connect to my docker services in docker when using my vpn

Im trying to setup all my docker services so they will only be accesible when using my vpn, but it isnt working. Those are my ufw rules 22/tcp ALLOW 192.168.1.0/24 51820/udp ...
user avatar
0 votes
0 answers
118 views

How can I deny a specific port on a certain interface/public IP using ufw?

I tried using the command below but I can still connect to it via browser. sudo ufw deny from any to {public IP} port 8080 I am running a wikijs (running on port 8080) on a server with cloudflare ...
user avatar
  • 1
0 votes
0 answers
33 views

Do I need to allow ssh v6?

I ran sudo ufw allow from <IPv4> proto tcp to any port 22. But this resulted in allowing ssh in from Anywhere to ssh v6. Which is kinda not what I wanted so I sudo ufw delete <sshv6-rule-...
user avatar
0 votes
4 answers
60 views

How to secure my server with UFW (presumed under attack)

I am running Apache on Debian. Below is a sample of entries in my apache error log. Question 1: Is the server under attack (I see about a 30-40 such entries every hour). I am presuming that these are ...
user avatar
  • 105
0 votes
0 answers
19 views

Prevent ufw to log lines based on string/keyword?

Is it possible to prevent certain repeating lines to be logged in ufw log? I basically wants to stop all lines containing UFW BLOCK & SRC=192.168.0.202 Full line example: Feb 5 13:03:38 ddomain ...
user avatar
0 votes
1 answer
67 views

Blocked port 22 but still have root access to ftp

recently I messed up hard and blocked port 22 with ufw, but I still have root access with sftp. I tried editing /etc/ufw/ufw.conf and set ENABLED=no but even after reboot I still cant connect. Any ...
user avatar
0 votes
1 answer
165 views

fail2ban fails to add iptables to rules

I'm having issues with fail2ban is not adding the banned IP to iptables. this is the error; 2022-01-29 15:13:48,499 fail2ban.actions [2608]: NOTICE [man] Restore Ban 212.192.246.26 2022-01-29 ...
user avatar
0 votes
0 answers
245 views

ufw failed to be initialized

I just make a fresh Docker container. But, when I try to enable ufw, I get the following error message: # ufw enable ERROR: problem running ufw-init modprobe: ERROR: ../libkmod/libkmod.c:586 ...
user avatar
  • 101
0 votes
0 answers
74 views

How to deny specific broadcast traffic from VM with UFW

This question relates to a Debian server with KVM and a Windows guest running on it and UFW 0.36.1. The server has a local subnet 192.168.0.0/24 and KVM has its own subnet 192.168.122.0/24 through ...
user avatar
  • 361
0 votes
1 answer
71 views

UFW port not accessible from public web despite rule explicitely allowing it

I have two dedicated servers: "web" (YYY.YYY.YYY.YYY) and "monitor" (XXX.XXX.XXX.XXX). Both are in the same network of a mass hoster (hetzner). Now on "web" I have 3 ...
user avatar
0 votes
2 answers
79 views

Why isn't logic working on ufw?

Let's say I want to allow my own external IP in on tun0 interface port 443. Why doesn't sudo ufw allow from 217.xxx.xxx.xxx proto tcp to tun0 port 443 Work (not on tun0 either) when sudo ufw allow ...
user avatar
0 votes
1 answer
99 views

check what processes connecting to external port

I am running an email server for a school associaltion and we offer email forwarding service for graduated students, offering them an email alias in our domain name, like johndoe@someschoolgrad.com, ...
user avatar
0 votes
0 answers
23 views

UFW not working properly when enabled and allowing port

So I have a VPN setup. I have a client in the VPN with a private IP address. I setup portforwarding from VPN server to the private IP on a port, let's say 8989 for example. Everything works great, I ...
user avatar
0 votes
0 answers
21 views

How do I block non-forwarded traffic for a dnat closed network?

I'm trying to set up a dnat closed network with UFW running on the gateway (Ubuntu 20.04.2). I have the following rules: -A PREROUTING -i enp0s5 -p tcp --dport 443 -d 192.168.1.1 -j DNAT --to-...
user avatar
0 votes
0 answers
50 views

how to allow packets for WS-Discovery?

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

Unable to resolve private dns zone over vpn with bind9 DNS

The Problem I have a VPC in which I need to access the servers using private FQDNs. The VPC is accessible through a wireguard VPN. The VPN server also serves as a DNS server running BIND9. I have set ...
user avatar
0 votes
0 answers
23 views

Configuring ufw to access the site via openvpn

I'm setting up ufw on debian. I have openvpn and pi hole there. I'm trying to make it so that the pi hole panel can only be accessed through a vpn, but I can't. Prescribed the command: ufw deny from ...
user avatar
  • 1
1 vote
1 answer
49 views

Impossible to open new port

My port 21 (ftp) is inexplicably blocked. Important points Disabling ufw change nothing, port keep being blocked The problem is for any new port, not just 21 I've tried to uninstall / reinstall ufw ...
user avatar
  • 11
1 vote
0 answers
17 views

Firewall to use when server has docker app hosted?

I use ubuntu 20.04 with portainer and nginxproxymanager to host my apps. Some are still being hosted bare metal but I am planning to transfer all to docker soon enough. But the problem is ufw, which I ...
user avatar
0 votes
0 answers
70 views

UFW: block outgoing to LAN

In order to protect my local network from an attack on an self hosted server (although it's probably unnecessary), I would like to block all outgoing traffic to the LAN. At first this seems easy, as ...
user avatar
0 votes
2 answers
58 views

Why is UFW blocking the smtp-plugin from Dokuwiki

I have on a virtual server (Ubuntu 20.4) Dokuwiki (2020-07-29 "Hogfather") with the SMTP plugin (Last updated on 2020-11-21) installed. My pages are delivered HTTPS encrypted, using certbot. ...
user avatar
  • 1
0 votes
0 answers
34 views

Allowed IP's are logged as blocked by UFW

The rule in UFW for SR.CSR.CS.RC IP is: ufw allow from SR.CSR.CS.RC As described in the rule, SR.CSR.CS.RC can access this server over any enabled port. But, when UFW is up and running, some lines ...
user avatar
  • 522
0 votes
0 answers
83 views

UFW blocks Https NAT response

I've got a setup with OpenVPN that routes two network to WAN. On the setup below Fedora Linux server provides OpenVEN access to WAN, while Mikrotik 1 router routes (not NATted) traffic to specific ...
user avatar
1 vote
1 answer
114 views

Enable UFW temporarily, not on boot?

Scenario: I am on a remote server, and if I set up UFW incorrectly, then I will be locked out without chance for easy recovery. So I want to start ufw and see if it works. If it doesn't, then I want ...
user avatar
  • 505
1 vote
0 answers
199 views

UFW OpenVPN issue on Ubuntu 20.04

I've got a curious OpenVPN / UFW issue on Ubuntu 20.04. I have a rule set to allow outgoing traffic over tun0: ufw insert 1 allow out on tun0 from any to any. The UFW defaults are set to deny, both in ...
user avatar
0 votes
1 answer
72 views

Why my port 27015 is scanned by several ISP across the world?

I configured my server to block all ports except 22,80 and 443 with UFW. I then created a fail2ban rule to put in jail every IP that scan ports unsuccessfully more than 5 times and report it to ...
user avatar
0 votes
0 answers
23 views

Limiting website access on main domain while allowing full access on subdomain?

I have a main domain and a subdomain on the main domain with different IPs pointed to the same instance of Nginx on my Ubuntu 20.04 VPS using UFW as a firewall. admin.mydomain.com -> 10.10.10.20 ...
user avatar
  • 3
0 votes
1 answer
40 views

debian as gatway block port from ip

I have a number of public ips behind a debian router connected to vms. I want a specific ip not to be able to use port 25 outgoing. I have tried /sbin/iptables -A OUTPUT -o ens19 -p tcp --destination-...
user avatar
  • 1
0 votes
0 answers
35 views

Access container's port from on eIP

I have three servers that are in same network via WireGuard. Their IPs are: 10.10.10.1 10.10.10.2 10.10.10.3 I have a docker container on 10.10.10.1 that give me service on port 8080/tcp. I want 10....
user avatar
0 votes
1 answer
57 views

Rebooted Ubuntu server, nginx site no longer accessible from browser

I rebooted my Ubuntu server this morning because I was having what appeared to be a low-memory error (happens occasionally, hasn't been enough of a problem to try and fix it). But now, my site (which ...
user avatar
0 votes
1 answer
76 views

Routing traffic between two OpenVpn servers

I'm trying to route traffic between two openvpn servers; I would like to have the following connection: Client --> OpenVpnServer1 --> OpenVpnServer2 --> Internet I have both servers running ...
user avatar
  • 1
1 vote
0 answers
168 views

UDP packets received internally but not externally - Ubuntu 18.04

thanks in advance for taking a look at this... I'm confident that the solution is simple - it's just I don't know what it is. Running nc -l -u 9090 AND nc -uv 82.165.109.4 9090 command on the same ...
user avatar
  • 11
0 votes
1 answer
239 views

UFW block port UDP 67 on all but specific interfaces?

I am new to UFW, trying to quit iptables for something that appears to be a lot easier at face value. I am just trying to get my head around the logic and do not know much about it yet. I have a ...
user avatar
  • 111
0 votes
0 answers
107 views

Conditional port forwarding with ufw as a default policy

Is there a way such that: when a connection is denied (by the rule set) in ufw, it forwards that traffic to another port on the local machine, rather than dropping (by default)? I can see two ...
user avatar
0 votes
1 answer
4k views

How to set up fail2ban with UFW on Ubuntu 20.04?

I'm trying to block IP addresses with fail2ban and ufw with the following configuration and the default ufw.conf in /etc/fail2ban/action.d. Jail config [app-custom] enabled = true maxretry = 1 ...
user avatar
3 votes
2 answers
2k views

Is it worth installing UFW on an AWS EC2 instance?

I would usually run UFW on servers I deploy, however I've just started using AWS and I see they already provide a firewall, allowing to set inbound/outbound rules, etc. So I'm wondering if it's ever ...
user avatar
  • 155

1
2 3 4 5
9