Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [ufw]

Uncomplicated Firewall (ufw)

1
vote
1answer
23 views

Make ufw follow iptable rules

I have a bunch of configuration in ufw that I want to avoid porting to iptables (unless there is a easy way to export from ufw and import in iptables). Simplicity of ufw etc. being the reason. Now I ...
0
votes
0answers
31 views

UFW Specific rule per IP

I have two ips on my machine, 193.70.80.99 and 51.68.55.231 I want to open port 22, 80 and 17071 (tcp) for 193.70.80.99 And open port 25565 (tcp) for 51.68.55.231 So that the 51.X ip cant be used ...
1
vote
0answers
19 views

ufw rule form errors

First, the errors, then the reasoning: $ sudo ufw allow 22/tcp in on eno1 from 192.168.0.100 [sudo] password for robinadm: xxxx ERROR: Invalid interface clause Hmm.... perhaps the "in" is redundant ...
0
votes
0answers
35 views

UFW failing to start at system boot, but manual enable works

Whenever I reboot my server, UFW will refuse to come up, with the following error messages being visible in systemctl status ufw.service: Dec 21 02:02:39 ironwolf ufw-init[503]: iptables-restore: ...
0
votes
1answer
103 views

What is the best way to stop attacks at wp-login.php?

In the access logs of my server I find thousands of attempts to access wp-login.php, but none of the sites on my server is wordpress... 37.19.108.121 - - [19/Dec/2018:02:31:10 +0000] "GET /wp-login....
0
votes
1answer
81 views

I can't use ufw on WSL-Ubuntu

I use Windows 10 home (build 17134.471) with WSL-Ubuntu 16.04 (xenial). I executed apt update -y && ufw --force enable and got the following trace (I don't know what it means - maybe some ...
0
votes
0answers
26 views

Does UFW support named rules or rule sets

Can I add a bunch of rules with a specific name so that I can later delete just those rules without disturbing any of the other existing ones?
0
votes
1answer
58 views

NitroShare and UFW firewall

I have installed NitroShare 0.3.1* on Ubuntu 18.10 and 0.3.4 on Windows 7. I can transfer files in either direction with UFW firewall off, but not with it on. I assumed that I needed to add some rules ...
0
votes
0answers
18 views

Restrict access to web application using UFW firewall [duplicate]

How can I use UFW to restrict the access to a web application (port 80) so it can be accessed only by specified IPs?
0
votes
1answer
34 views

Problem opening ports on Ubuntu 16.04

I am trying to open several ports on my computer running Ubuntu 16.04, which would allow me to run drone simulation software on it and connect to it a companion computer (Odroid). I have tried ...
12
votes
1answer
2k views

UFW: what exactly is it?

What is UFW? You would think this is an easy question, but the more sources I read, the less clear it gets. The acronym spells out to Uncomplicated FireWall, as though ufw actually implements a ...
1
vote
0answers
201 views

Can't telnet from my Ubuntu server 18.04.1 to specific routers using the telnet port (23)

I don't want to go far in to details, because I know you should not use telnet but ssh instead, however in my situation I need to use telnet. Basically, I have a Ubuntu server 18.04.1 and I have a ...
0
votes
1answer
41 views

What does ufw logging?

Normally ufw is disabled after a fresh setup. Recently I saw, ufw is activated. If I type sudo ufw status verbose the output is status:activ protocol: on (low) But /var/log/ufw.log is empty. ...
0
votes
0answers
26 views

Journalctl logs

I am getting plenty of such logs. My firewall seems to be blocking all of them. Oct 26 18:18:47 Host2 kernel: [UFW BLOCK] IN=eth0 OUT= MAC=00:50:56:f9:85:af:a4:f0:04:8f:a4:a9:08:00 SRC=67.58.35.280 ...
1
vote
1answer
71 views

Trying to write the perfect VPN kill-switch bash script - have a question about wlp3s0 traffic. Ubuntu 18.04

I recently started using Nordvpn which advertises that it has a kill Switch feature that supposedly will kill all traffic if it loses the VPN connection. After some experimentation I found that the ...
0
votes
0answers
26 views

Steps needed to make skyforlinux work properly in bionic beaver: Port / protocol configuration at ufw

I have the latest skype at bionic. I have opened 3478:3481/udp ALLOW OUT Anywhere . Also 80,443/tcp ALLOW OUT Anywhere . I am getting problems at transmission (video) for skype. ...
0
votes
0answers
54 views

Unable to connect to Ubuntu Server via ssh due to ufw rules update

I updated ufw on my ubuntu server in aws with the following commands Changed the port value in /etc/ssh/sshd_config file to 2200 from 22 sudo service ssh restart sudo ufw allow ssh sudo ufw allow www ...
0
votes
0answers
55 views

16.04 server ufw enabled but port open

UFW was not enabled after startup I have tried everything, and eventually put it in rc.local ufw enable, and now it's enabled after reboot. This is output of uwf status: ufw status Status: active ...
0
votes
0answers
120 views

How to check specific port status of ufw in shell script?

I want to check the status of a specific port of ufw in shell script. To check the status I wrote like this. ufw status | grep -c "^443\s\+ALLOW" It works now for my usage, but if possible I want ...
0
votes
1answer
37 views

Warnings and Errors when trying to do anything with UFW - uncomplicated fire wall

Probably a total noob question related to user error, but when running sudo apt-get install ufw it returns that I have the newest version installed, but then if I try to either reset sudo ufw reset ...
0
votes
0answers
33 views

Unable to install ufw as a snap on Ubuntu Core 14

I unpacked the Ubuntu Core 16 AMD64 image in a virtual machine,1 completed the setup menus, then immediately tried to install ufw as a snap. After a couple of minutes, I get an error: root@localhost:...
0
votes
0answers
30 views

Can UFW drop existing connections?

With iptables I can create deny rules that will drop existing connections. I can't find a way to do this with UFW, is it possible? It seems to only block the creation of new connections. n.b. I see ...
0
votes
0answers
713 views

UFW and samba on Ubuntu 18.04

I'm trying to set up UFW to allow me to access SMB file shares on a windows machine from Ubuntu MATE 18.04. If I turn UFW off, I can access a file share by hostname just fine e.g: smb://computername/...
0
votes
0answers
122 views

I want block all non-OpenVPN traffic in ufw

I found the script: # ufw default deny incoming # ufw default deny outgoing # ufw allow out on XYZ to XXX.XXX.XXX.XXX # ufw allow out on tun0 # ufw enable XYZ - virtual interface network card (...
0
votes
0answers
25 views

UFW VPN killswitch with freenas server

I am trying to use UFW as a VPN killswith, however, I would like to also access my freenas server while I have this killswith enabled. I have this line sudo ufw allow from 192.168.1.x in my ufw file, ...
0
votes
0answers
205 views

Port closed error even after opening it with ufw

I just created an Ubuntu Server on Digital Ocean for a NodeJS SMTP email project. I am getting an error in my pm2 logs when I start up the server via sudo pm2 start npm -- start: 0|npm | Error ...
0
votes
1answer
182 views

Trouble accessing Ubuntu server with SSH [duplicate]

I purchased a new Ubuntu server several months ago. It is connected to my router. I was able to set up port forwarding for port 22 with my ISP, and then SSH into the server using the internal IP from ...
0
votes
0answers
123 views

smbtree returns nothing if firewall active

The systems are at different kernel levels Two systems each running XUBUNTU 16.04. When ufw (firewall) is disable, both give a full list of shares, some of which are Ubuntu while others are Windows XP....
1
vote
1answer
210 views

UFW no longer allowing connection when enabled

I have been using openvpn with UFW as a killswitch without issue, but now my internet stops working when I enable UFW after VPN conection is made. Ifconfig shows a tun0. I have been using the ...
0
votes
1answer
24 views

Openning 443 port with ufw

Although ufw status shows that port 443 is allowed, the netstat -tulpn shows nothing. root@machine:/etc/nginx/sites-available# ufw status Status: active To Action From --...
0
votes
0answers
35 views

ufw inactive, unable to connect to MySQL through port 3337

I'm trying to connect to a MySQL database through port 3337, but it keeps failing. I think it is not a MySQL problem because I'm able to connect using port 3306. This is the command I'm using: mysql ...
1
vote
2answers
627 views

Ubuntu Server 18.04.1 Netplan and UFW

Ok, so I want to make a router using Ubuntu Server 18.04 ( already have the hardware and it all works, I have IPfire currently on it). I’ve looked at all the router distros and they seem rather ...
0
votes
0answers
231 views

Connection refused on port 7777 Ubuntu 16.04

I've got an app listening for port 7777, and when I run sudo netstat -tnlp | grep :7777 I can see that the relevant port is being listened for... tcp 0 0 127.0.0.1:7777 0.0.0.0:* ...
0
votes
2answers
117 views

can't disable my UFW

i want to setup a server in my local network and i want to disable my ufw. After i have checked the web i have seen that i need to run the command: "sudo ufw disable". after i have used the command ...
0
votes
1answer
746 views

iptables/ufw: Block specific host access to internet based on time

I'm running Unbuntu 18.04 as my router/server, which passes traffic over to the internet via interface enp5s0. On my internal interface (enp4s0) I have devices that I wish to restrict from the ...
6
votes
1answer
582 views

UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling

sudo ufw disable followed by sudo ufw enable kicks me out of SSH DMESG reports [UFW BLOCK] IN=eth0 OUT= MAC=30:........ SRC=192.168.1.me DST=192.168.1.server LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=...
0
votes
1answer
67 views

I typed iptables -F by mistake, how to undo? [duplicate]

I typed iptables -F by mistake, how can I undo it? I see now strange activity on my routers IP, scanned it and saw that strange ports are open. How can I block these ports?
0
votes
0answers
31 views

allowed 8388 but found some other ports still open

my code sudo ufw allow 8388 but if I scanned the all ports found that ports 22 80 110 443 also opened if I checked the status of ufw sudo ufw status it only displayed 8388 was opened To ...
0
votes
0answers
304 views

how to deny traffic from ipv6 using ufw

How can I easily deny traffic from an IPv6 using ufw? I know I can do the following for IPv4: ufw insert 1 deny from 123.123.123.123 comment "scraper" However, the following does not work: ufw ...
1
vote
3answers
106 views

Block access via access.log

My access.log are full of: Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com) CCBot/2.0 (http://commoncrawl.org/faq/) Mozilla/5.0 (compatible; spbot/5.0.3; +...
0
votes
2answers
473 views

DNS Resolution fails with UFW & OpenVPN (ProtonVPN Server)

I have an issue I've been trying to solve for a few days now - I'm working on a relatively fresh installation of Ubuntu 18.04, I enabled UFW and configured it with the following rules. sudo ufw ...
0
votes
0answers
19 views

REST service not accessible on Ubuntu 18.04

I have a REST service running on a Ubuntu 18.04. It fails to respond to outside requests. NginX pages hosted on port 80 are accessible, and the service requests are found in NginX log file. I then ...
1
vote
0answers
198 views

ssh port forwarding and ufw

I am running a computer at a very remote site (6 hours away), and I would like to control it remotely. For security, I would like to block everything except port 22 from the outside world. I need to ...
0
votes
0answers
342 views

iptables does not add/list PREROUTING rules

I'm trying to add all of the anti-DDoSing rules from JavaPipe after removing UFW from my system and deleting all of the ufw chains (though the referenced answer didn't work. I had to run iptables -F ...
0
votes
1answer
79 views

I registered IP DENY on Ubuntu UFW but it does not work

182.100.67.235 IP is still connected. How can I do? ufw status Status: active To Action From -- ------ ---- [ 1] Postfix ...
1
vote
1answer
84 views

Why do rules I create in graphic firewall (gufw) get deleted (force deleted)?

I used the graphic firewall in 18.04 to create rules for 3 services. At the time they were created, the rules were fine and the items accessible from other machines on my home network. The next day, ...
0
votes
0answers
50 views

ufw blocks some incoming https packet although it is not supposed to?

I setup ufw on a box which should expose only a web server and SSH to the outside world: # ufw default deny incoming # ufw default allow outgoing # ufw allow ssh # ufw allow http # ufw allow https # ...
0
votes
0answers
57 views

allow my laptop to ssh to my server through ufw from any ip

What are the different options for doing this? Allow any IP but require a certificate? Allow any ip but for added security require strong passwords? I suppose if there is an option for mac address ...
1
vote
1answer
2k views

How do I get ufw to start on boot?

ufw is not starting for me on boot. My /etc/ufw/ufw.conf file looks like this: # /etc/ufw/ufw.conf # # Set to yes to start on boot. If setting this remotely, be sure to add a rule # to allow your ...
3
votes
1answer
98 views

How can I put speed limits on ports?

I have UFW enabled, so the solution should not interfere with it. It should also work after reboot. I currently know these commands which limit the data usage of ports: sudo iptables -I OUTPUT -p ...