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.
489
questions
0
votes
0
answers
82
views
Avoid adding new UFW after docker restart
I'm hosting a web application on my server and want to it to be reachable only from a few specific IPs. UFW/iptables sounds like a good choice here.
After reading The dangers of UFW + Docker I've ...
1
vote
1
answer
873
views
Getting Monit Web Interface and CLI to work on Ubuntu server
I have a hard time getting monit to work on my Ubuntu 18.04.4.
I've installed monit via sudo apt install monit, then I've enabled httpd like this:
set httpd port 2812 and
use address localhost
...
0
votes
0
answers
3k
views
Ubuntu server UFW log files
I got a server running Ubuntu 18.04. I have set up ufw with the basic deny all incoming, allow all outgoing with a few specific ports being allowed in. With logging activated on level low I still can'...
4
votes
3
answers
939
views
How to intentionally cause ssh root connection refused
Simple, how do I make ssh (port 22) drop/refuse a connection if root@ip_address request is received, but still allow user@ip_address to work properly. Basically hide the fact there's a server at that ...
0
votes
1
answer
929
views
UFW: how to allow access to port 9999 on one IP only
At the bash command line on an Ubuntu 16.04 server, the command 'ufw allow 9999' opens that port on every IP address being publicly exposed on the server. But I only want port 9999 to be exposed on IP ...
0
votes
1
answer
4k
views
Can't open port with ufw
I need to open the port 8081 for my application. I want to connect to the application from another server. Problem I can't open the port.
I started the application with port 8081 and ip 0.0.0.0 and ...
0
votes
1
answer
232
views
openvpn restricting clients from accessing certain IP's in internet with ufw
I'am looking for a solution which can block openvpn clients in accessing certain website(ip's) in internet, i tried ufw rules like below , but doesnt seems to work from client,
what piece do i miss?
...
0
votes
1
answer
2k
views
OpenVPN Server Routing/Firewall Settings [closed]
Short Desc: Connecting Rasp pi 3 as client to data center dedicated server for pulling backups over rsync. Getting "ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16)"
Long Desc: ...
0
votes
0
answers
998
views
ufw not blocking the connection
ufw default deny incoming
ufw default allow outgoing
ufw reset
ufw allow ssh
ufw enable
But when I make PPTP connection to my server it is still allowed.
UFW STATUS VERBOSE
0
votes
0
answers
242
views
Proper UFW rules for webserver being tunneled through Openvpn Server on EC2 instance
I have configured a webserver locally. I am running an Ubuntu 18.04 EC2 instance which is configured as an openvpn server. My webserver is successfully connecting/tunneling to my OpenVPN Ubuntu server ...
15
votes
1
answer
38k
views
Ufw and Iptables. Which is better and why? [closed]
I am a newbie to this domain, so i kept researching on ufw and iptables. But I cant distinguish them clearly because in every article /blog both of these names are present and I am really confused ...
0
votes
2
answers
1k
views
How to block Internet Traffic to MySQL on Ubuntu 18.04
I have setup two KVM servers with a local hosting service. They provide me with one public IP per server. I installed mysql-server 8 on one of them. Before describing the issue, here's the result I'm ...
0
votes
0
answers
367
views
UFW activated, but still failed connections in auth.log
I activated the ufw on my ubuntu 18 server. After resetting to defaults, deny all incomming, I opened port 22, 80 and 443 and enabled the logging.
In the ufw log, I can see a lot of blocked request.
...
0
votes
2
answers
656
views
Use ufw to block users from accessing my server via a specific vpn
The last couple of days I've been having some weird small DDoS attacks on different VPS's I have online.
The first one I detected using netstat and I noticed a bunch of IPs that were from a ...
1
vote
1
answer
2k
views
UFW/Iptables: Allow response to http(s) requests but block everything else
I'd like to block everything outgoing from my server while still allowing responses to incoming http/https requests.
Some examples:
User calls my server using his browser (https://myserver.example....
1
vote
1
answer
4k
views
ufw replacement (or workaround) for Debian 10
We have servers where the admins are used to using ufw on Debian 9. Upgrading to Debian 10 means switching from iptables to nftables (yes, we could still use iptables-legacy but do not want to unless ...
0
votes
2
answers
6k
views
Unable to allow Nginx in firewall
I installed Nginx on my Ubuntu 18.04 server with the following command :
$ sudo apt-add-repository ppa:hda-me/nginx-stable
$ sudo apt update
$ ubuntu@www-example-com:~$ sudo apt install brotli ...
0
votes
1
answer
1k
views
Nginx not responding from outside the remote box
My website (Django/nginx/gunicorn/mysql) which is hosted on a remote box was working fine, until I decided to restart remote box for some reason. So after the restart, in the remote box when I say ...
1
vote
2
answers
921
views
Do I need UFW in a Linux VM in Azure?
Access to Azure VMs are controlled by the "Network Security Group" (NSG) settings. I am in the process of setting up a Linux VM with a public IP on Azure and would like to know whether the NSG ...
0
votes
2
answers
2k
views
How can I make an IP white list for a port that is exposed with docker-compose
I'm trying to make a port (that is exposed by docker-compose) on public IP available only for some of my other IP addresses. I still need other ports to accept connections from any IPs.
I've tried ...
1
vote
0
answers
3k
views
Fail2Ban -> UFW -> IPTables (how to log blocks)
Running:
Ubuntu 18.04.4 LTS
Fail2Ban v0.10.2
ufw 0.36
iptables v1.6.1
I've successfully setup fail2ban to use ufw to block ip's based on ssh authentication failures. As we know, ufw is just a front-...
1
vote
0
answers
27
views
Is it possible to include the service or protocol name in ufw status output?
When running ufw status on Ubuntu 18.04, I'd like to be able to see the service or protocol name e.g. http, IMAP. Is this possible just using a single command? So in a list like the following there ...
0
votes
0
answers
397
views
Why is UFW blocking port 80 when port 80 is allowed?
I have set up dozens of these Ubuntu 18 servers and have never had any issue with this before. I can't figure out for the life of me why it is blocking. Here is my UFW status:
$ sudo ufw status
...
1
vote
1
answer
14k
views
(UFW) allow incoming and outgoing connections to specific IP, deny everything else
I'm trying to set up an UFW firewall 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 item, the ...
1
vote
0
answers
561
views
Ubuntu 18.04 as a reverse proxy server and NAT box
I'm setting up a system made of application and database servers all running on a private LAN. The application servers are accessed through HTTP Nginx reverse proxy server and the database servers are ...
1
vote
1
answer
2k
views
GCP Connection Failed - SSH - We are unable to connect to the VM on port 22
Since I received a email warning letter from google says "Action required: Critical problem with My First Project" saying my server has some abnormal outgoing activity , I tried to implemented ufw in ...
1
vote
2
answers
3k
views
ufw Firewall disabled after reboot
On Debian Buster I have installed the UFW Firewall
However, after enabling
$ ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled ...
0
votes
3
answers
2k
views
UFW + fail2ban not working with `nginx` to block attack scripts
my server is currently attacked by some script kiddies. I have set up fail2ban which correctly bans the IP.
2020-01-07 05:51:45,639 fail2ban.actions [1656]: WARNING [nginx-botsearch] 123.207....
0
votes
1
answer
96
views
Troubleshoot firewall config, find what is blocking ports
I'm facing a problem with some firewall configuration.
I've got a VM on Google cloud (based on a bitnami image), and I can't connect to it through port 80.
I've set up some firewall rule with the ...
0
votes
1
answer
308
views
What is the UFW equivalant of the following iptables rules?
I'm trying to translate some iptables rules to UFW but struggling a little. I believe the following:
iptables -A INPUT -i lo -j ACCEPT
would be:
ufw allow in on lo
I can't figure out the following ...
0
votes
1
answer
1k
views
UFW - allow connection to specific port from specific IP addres range
how to add rule by UFW that will allow connect to let's say SSH from ip range 10.0.0.10-10.0.0.20 ?
does UFW supports --src-range function like iptables?
0
votes
1
answer
882
views
Can UFW do port forwarding of IPv4 to IPv6
I have an http/https server which is IPv6 only. To allow people who have IPv4 only to reach it I would like to use a server in the middle with IPv4 address and forward traffic to the IPv6 server from ...
0
votes
1
answer
2k
views
remove 3/min-limit of UFW logging (the clean way)?
since I'm not satisfied with th iptables ansible module (not stateful) I'm trying my way with UFW.
Problem is, that UFW limits logging to 3/min which might be enough for nonentusiasts.
so my ...
0
votes
1
answer
734
views
unban or unblock IP-address from fail2ban and iptables
Fail2ban blocked an IP-address which I would like to undo. I have When I run sudo fail2ban-client set sshd unbanip xxx.xxx.xxx.xxx (where the xx-part is the IP-address) I get a response:
NOK: ('...
0
votes
1
answer
4k
views
Wireguard Access between clients - UFW block
there is a problem in wireguard setup regarding to UFW.
CLIENT A -------- SERVER -------- CLIENT B
10.10.10.5 10.10.10.1 10.10.10.11
I want to access SSH from Client A to Client B, ...
1
vote
1
answer
1k
views
Need IPTABLES rules explanation about OpenVPN set up
I've got Ubuntu 16.04 and OpenVPN installed and seems to be working fine. But when I check firewall rules using "sudo ufw status", then I see this:
Status: active
To Action ...
0
votes
1
answer
742
views
tun0 errors when running a vpn server?
I'm running a simple vpn server with these softwares:
OpenVPN
Shadowsocks
MTProto Proxy
My server config is:
Ubuntu 18.04 x64
512Ram, 1vCPU
UFW firewall
Netdata monitoring
Nginx
It's been only few ...
1
vote
1
answer
1k
views
Which IPv4/6 ICMP types should I drop to block ping?
I'm using ufw.
I want to block pings for IPv4 and IPv6. I've read guides by ubuntu as well as hosting companies I use, and answers on StackExchange sites.
Advice is always to edit /etc/ufw/before....
1
vote
1
answer
670
views
Ubuntu firewall how to configure idle connection timeout
How do I configure an idle connection timeout with Ubuntu firewall ?
I am encountering an issue in my production environment and suspect that the idle connection timeout in the firewall is causing ...
0
votes
1
answer
217
views
Ufw denying and re-allowing without adding two rules
So I'm using Fail2ban and the way it bans and unbans IP addresses is by using the ufw deny from xx.xx.xx.xx to any and allow. However, because new rules need to stay on the top of the list (above the ...
2
votes
0
answers
272
views
Change logging priority of UFW
As far as I can tell (through journalctl -p 4) UFW logs all blocked connections as warnings. I'd really like to be able to use that log level for things I actually might want to respond to. Is there ...
0
votes
0
answers
442
views
OpenVPN: forward traffic on specific ports to client
I have an OpenVPN server on a DigitalOcean machine, and several clients connecting to it, including a Synology NAS with a mail server. I would like to use the VPN server to forward all incoming mail ...
3
votes
1
answer
2k
views
Opening firewall of ubuntu server to access gunicorn/Flask app running on port 80
I am trying to serve an intranet application from a server running Ubuntu 18.04 on our local network
The application is written in Flask and I have deployed it using gunicorn with the command
me@...
1
vote
0
answers
47
views
How to block bad url path that is not part of my site from showing in google search?
I have got a site that is running on Node.js (Express) , and Apache httpd.
Hundreds of requests are coming in from malicious IP's, which I'm proactively blocking. (I have a script that looks at the ...
1
vote
0
answers
2k
views
SSH operation timed out while connecting to ubuntu
I have a Ubuntu server in which Nginx is configured as a reverse proxy to my web application. After configuring UFW rules for Nginx I am unable to do ssh with my box. I suspected this could be the ...
0
votes
2
answers
2k
views
UFW is blocking mailserver traffic (dovecot, postfix, MariaDB, Rspamd)
As described in the title, I am running a dovecot/postfix/Rspamd Mailservercombo with a MariaDB behind it.
I noticed how, in the last days, I couldn't receive/send any mail from my e-mail clients ...
0
votes
1
answer
514
views
UFW Doesn't Log Until Reboot
I am running UFW on a Pi and I have a cron job which backs up the log file and then removes it.
However, UFW doesn't recreate the log until after a reboot.
After removing the file and confirming ...
1
vote
2
answers
2k
views
Blacklisting IPs with Docker, Traefik and DigitalOcean
I’m currently using Traefik on a digitalocean instance with Docker provider enabled. It’s working well with several containers (frontends and backends). The problem is that most DO IPs are recycled ...
0
votes
1
answer
805
views
ufw fills loads of iptables rules
Is it normal to have a bunch of iptables rules after one ufw allow portnumber/tcp ?
This is my input after that:
Chain INPUT (policy DROP)
target prot opt source destination ...
1
vote
1
answer
329
views
Why UFW logs ICMP and TCP/UDP in the same line?
I'm trying to understand how log format is organised. My question is why ICMP block goes with some enclosure about another TCP/UDP packet. How am I supposed to read this [include] and how this packet ...