Questions tagged [ufw]
ufw is the default firewall application for Ubuntu Linux.
109
questions
0
votes
0
answers
26
views
Forwarded packet seemingly, skipping POSTROUTING rules
I have a very simple Wireguard configuration. Client are assigned 10.7.0.0/24 addressed, traffic is forwarded out the primary interface, finally the packets are SNAT'd out of the primary interface on '...
3
votes
2
answers
1k
views
enabling ufw failed with Ubuntu from WSL2
It is a fresh install of Ubuntu 20.4 or Ubuntu 22.04 but they all failed when I tried to enable ufw with errors as below from a Ubuntu console.
sudo ufw enable
Traceback (most recent call last):
...
1
vote
1
answer
651
views
Allow a list of IP addresses to access ports with UFW
I want to allow a list of (around 100) IP addresses to access a website on an ubuntu server. I'd like to be able to refresh the list via cron.
I'm trying to do it with UFW. I thought this might be ...
0
votes
1
answer
523
views
Ubuntu UFW: how to add ipv6 tcp/udp rule?
For example, what is the ipv6 only equivalence of ufw allow 22/tcp?
UFW documentation does not list valid protocol names, and I could not figure out the protocol name for tcpv6.
0
votes
0
answers
347
views
How to edit ufw .rules files?
Where can I learn the syntax and options available in ufw configuration files such as /etc/ufw/before.rules? I have searched the ufw manual, ufw wiki, and on DuckDuckGo and nowhere have I been able to ...
0
votes
1
answer
2k
views
Wireguard isn't working, 'wg0' doesn't exist
I've got an issue with wireguard. I have a debian-based VPS, and a Manjaro client.
Here is my /etc/wireguard/wg0.conf of a server:
[Interface]
Address = 10.0.0.1/24
ListenPort = 194
PrivateKey = <...
1
vote
0
answers
217
views
How to configure ufw to limit only failed ssh connections, not successful ones?
My OS is Ubuntu 20.04 LTS.
Is it possible to configure ufw limit -rule for remote ssh so that it limits only failed ssh connection attempts? Now it limits also successful ssh connections, which is ...
0
votes
0
answers
144
views
What is the analogue of iptables' exclamation mark in UFW?
What would be the analogue of this iptables commad in ufw?
iptables -A OUTPUT ! -d 5.5.5.5 -j DROP
What is the analogue of exclamation mark in ufw? In other words, how to match all IP addresses ...
0
votes
0
answers
464
views
How to allow specific program through Linux firewall?
I have ufw/gufw with the following rules:
Deny all incoming and also deny all outgoing.
Now I want to add an exception to these rules:
Let's say I have a custom web browser named MyBrowser and I want ...
1
vote
0
answers
55
views
Disable software inserting firewall rules
I'm using Ubuntu 20.04 with Postfix, Dovecot and UFW,
when installing both Postfix and Dovecot I immediately noticed they're adding their own rules into iptables, however using the UFW commands I can'...
0
votes
0
answers
441
views
How to allow an app on a specific interface?
I have a network interface my_very_important_vpn and a ufw app tensorboard:
$ sudo ufw app info tensorboard
Profile: tensorboard
Title: Tensorboard
Description: Tensorboard - a web application for ...
0
votes
0
answers
476
views
Debian with VPN and firewall blocking web traffic
I have a VPN (IKEv2) set up on a Debian VM. I'm trying create a kill switch to stop all traffic when the VPN goes down. I've followed the guidance of this post.
It seems to work fairly well (torrent ...
0
votes
0
answers
210
views
Can't clone a remote repo when ufw is enabled
I have a cloud VM running alpine3.15 [disk mode enabled] and I am able to clone/push/pull to github when ufw is off. However when it is on, all git commands that talk to github get stuck (no output)
I ...
0
votes
1
answer
831
views
Ansible UFW allow outgoing, deny incoming
try to roll out UFW via Ansible.
- name: Install UFW Firwall
hosts: all
tasks:
- name: UFW enabled
community.general.ufw:
state: "enabled"
policy: "deny&...
2
votes
1
answer
3k
views
Enable access to host service with ubuntu firewall from docker container
I have a service running on a host at port 8545. I have several docker containers which need access to this service on the host. The host is running ubuntu. I've successfully configured
extra_hosts:
- ...
0
votes
0
answers
601
views
can't connect remotely to ftp server
after installing and configuring vsftpd on my Ubuntu 20.04, I'm unable to connect to my ftp server remotely. It works fine inside my LAN.
I'm behind a NAT, but have all the necessary ports forwarded, ...
2
votes
1
answer
381
views
How to allow IPIP (IP encap, proto 4) with ufw?
I have tried:
# ufw allow proto ip-encap from 198.51.100.3
ERROR: Unsupported protocol 'ip-encap'
# ufw allow proto ipip from 198.51.100.3
ERROR: Unsupported protocol 'ipip'
# ufw allow proto 4 from ...
0
votes
0
answers
64
views
Can't start openvpn server..? Does anybody have an idea where issue lies?
root@debian:/etc/openvpn/server# systemctl status openvpn@server
● openvpn@server.service - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled; vendor preset:...
0
votes
0
answers
139
views
My HUAWEI router does not seem to open all the ports that is set to open without giving me any relevant output. Why so?
Some of my ports that I reckon I did my best to open them do not appear to be open for canyouseeme.
For example, I get this from the website (I replaced my public IP with wildcard characters for ...
0
votes
1
answer
638
views
Using ufw to block established telnet connection
I'm trying to learn ufw and I'm wondering if I can block established connections with it.
I've made connection between my 2 computers using telnet and I'm trying to use ufw to block it.
Tried many ...
0
votes
0
answers
977
views
How to block outgoing connection to external website with ufw?
I'm using debian10 ufw, command as next:
ufw deny out to 10.192.225.199 port 80
And the status as next:
# ufw status
Status: active
To Action From
-- ...
5
votes
1
answer
2k
views
What are the advantages of ufw, is it really needed?
I am quite enough familiar with iptables and I find iptables -L -v easy enough to read. Backuping is easy and I am happy with that.
However in recent versions of Ubuntu there is ufw that quite pollute ...
1
vote
0
answers
42
views
How to explain UFW firewall LAN packet from external source on non-forwarded port?
I have a small home server with hostname mango running Debian, with UFW firewall and logcheck installed. For years, my (NAT) router has a very limited number of port forwards to this mango server. ...
1
vote
2
answers
4k
views
Can I use WSL's ufw as a firewall for Windows 10?
I recently found out Linux is shipped with ufw as a firewall, so I thought if I can use WSL, it will be constantly running as a firewall; I know Windows already has a firewall, but having two wouldn't ...
0
votes
1
answer
123
views
Debian 10 UFW Blocking allowed return traffic even after reload, reset, restart
Been dealing with this problem for a while. UFW seems to only block most of the traffic, as responses to get accepted according to the PCAPs I've done. In the example below the traffic is originating ...
0
votes
1
answer
365
views
Unable to delete a ufw rule that has a space in it
After installing ufw on several servers, I see the following rules:
To Action From
-- ------ ----
224.0.0.251 mDNS ALLOW ...
1
vote
1
answer
7k
views
What is the equivalent of ufw in Windows?
Trying to connect to Digital Ocean from a Windows 10 computer and getting Connection timed out on port 22. I learned it is because the port is blocked and needs to be opened. This command sudo ufw ...
0
votes
0
answers
25
views
ufw blocks secured ftp transfer when ports are opened [duplicate]
After forcing strict firewall rules (deny everything) and creating following exceptions with ufw:
To Action From
-- ------ ----
OpenSSH ...
4
votes
5
answers
9k
views
Ubuntu: Delete several ufw rules
How can several ufw rules be deleted at once?
By using
$ ufw status numbered
Status: Aktiv
Zu Aktion Von
-- ------ ---
...
1
vote
0
answers
69
views
UFW white list ip address and domaines?
is it possible to have some sort of white list of IPs addresses and domains name allowed for incoming traffic and block all the rest? or is it better to enable incoming traffic whenever I want to ...
1
vote
0
answers
13
views
few questions regarding ufw firewall
I recently notice some increase on my raspberry and since I am on a limited data cap. I thought using UFW to block incoming traffic can help alleviate this problem while I figure out the reason for ...
0
votes
1
answer
113
views
UFW firewall does not allow any ports (Debian 9)
I'm facing a really incredible problem, I don't understand how it is possible elsewhere.
I use ufw to manage my ports. I have an FTP server to install on my Linux server. When ufw is enable, I can no ...
1
vote
2
answers
1k
views
Ubuntu docker image /bin/sh: 1: ufw: not found
Trying to open a port on an ubuntu 18.04 image and no luck
Running RUN ufw allow 8080 returns
/bin/sh: 1: ufw: not found
Any ideas as to how I can open this port or run ufw commands?
2
votes
1
answer
2k
views
Debian 10 stopped on reboot after "Reached target system time synchronized"
I have a Debian 10 virtual server and I have removed ufw and iptables and rebooted the machine. Upon start, the system pauses at the Reached target system time synchronized line.
After few minutes ...
0
votes
1
answer
709
views
(UFW) allow incoming and outgoing connections to specific IP, deny everything else
I'm trying to set up an UFW firewall on Ubuntu like this:
Allow all incoming and outgoing connections to IP 1.1.1.1 (all ports);
Deny all other connections (incoming and outgoing);
For the first ...
0
votes
1
answer
120
views
Apache connection time out or rejected
My father and I host several websites from an Ubuntu desktop machine.
He replaced his router and suddenly the websites weren't loading. the IP address had changed. It seemed to me that Comcast's silly ...
1
vote
1
answer
78
views
IP traffic getting access even after blocking
There are multiple access records like the example I've provided below indicating traffic is allowed through to my system even after I have run these commands to deny this traffic.
ufw deny from 78....
-1
votes
1
answer
102
views
Raspbian router/firewall
Hello fellow superusers,
Here is the topology of my lan. WAN - modem-router-firewall - Pi router-firewall - lan machines .
I use a test machine in the lan: bob.
I cannot access the internet sites ...
1
vote
0
answers
397
views
Block a list of IP addresses in ufw firewall
Is there a way to block outbound connections to a list of IP addresses in ufw firewall?
I need to be able to easily remove the blocked IPs from the ufw firewall at a later stage.
0
votes
0
answers
21
views
PostrgreSQL not portforwarding
Im having an ubuntu server 16.04 that i have installed postgresql server onto with ufw but even after allowing the port 5432 and as well as checking the conf for postgresql.
I even tried follow ...
1
vote
1
answer
3k
views
I can't log to ssh after enable UFW
When i try Set Up a Firewall with UFW on Ubuntu i start with enable port 80 and 443 for http and https but before enable ssh
because internet probleme i lost connexion with putty so now i can't log ...
3
votes
2
answers
1k
views
Syntax for ufw app profiles, specifically to define interfaces and IP addresses
After googling several sites and browsing through the [man page][1], I still come up short with an exact definition of the syntax of the application profiles for ufw rules.
All examples you find of ...
1
vote
0
answers
85
views
Setting UFW permissions
I am new to Linux and Ubuntu. I just activated UFW set the following permissions. Basically only allowing HTTP, HTTPS and email as well as DNS out.
In checking the log, I see the the kernel is being ...
1
vote
1
answer
2k
views
Could I set up ufw to only allow access from the specified ip addresses?
For really high security, how can I add ip addresses of the websites that I want to visit individually? What command should I use?
How could I get ip addresses of the websites without being able to ...
1
vote
1
answer
4k
views
UFW configuration for Transmission
It's driving me crazy but I can't figure out how to configure UFW for transmission-daemon.
I have the following rule on UFW
> 51412 ALLOW Anywhere
&...
1
vote
0
answers
328
views
Why does ufw always block the SCTP protocol, regardless of what rules I have?
ufw seems to always block the SCTP protocol whatever rules I have set up:
For example, running enabled even with no rules:
ufw reset
ufw default allow incoming
ufw enable
I still see SCTP ...
0
votes
1
answer
984
views
How to make UFW work with firewalld on CentOS 7?
I've installed UFW on a fresh CentOS 7 installation, but it doesn't open the ports. I'm configuring UFW as I would on a Debian system:
sudo ufw default deny incoming
sudo ufw default allow outgoing
...
1
vote
1
answer
261
views
Exposing service listening to localhost, to public using UFW/iptables
I have a service that listens to 127.0.0.1:15750 and would like to make that service listen to 0.0.0.0:15750 using just UFW (or iptables if not possible with UFW).
Basically listen same port (or not ...
0
votes
1
answer
386
views
Not able to open port on Ubuntu Server
root@server:~# ufw allow 83973/tcp
Rules updated
Rules updated (v6)
root@server:~# sudo ufw status verbose
Status: inactive
root@server:~# sudo ufw enable
Command may disrupt existing ssh connections. ...
0
votes
1
answer
2k
views
How can I whitelist my Android device?
I have been digging and spending a lot of time setting up the most secure SSH environment possible on one of my servers. The last security measure that I want to take is to whitelist my phone on my ...