Uncomplicated Firewall (ufw)

learn more… | top users | synonyms

33
votes
5answers
8k views

Why is the firewall disabled by default?

Why is ufw firewall included in Ubuntu, when it is not enabled and pre-configured by default? Most users don't even know it is there, because no GUI frontend is provided.
9
votes
2answers
3k views

potential ufw and fail2ban conflicts

Will running both fail2ban and ufw cause problems? I noticed that fail2ban modifies iptables rules, but ufw already has a ton of iptables rules defined... so I'm not sure if fail2ban will mess these ...
9
votes
1answer
768 views

Precautionary security measures for a home user? (firewall, antivirus, etc)

I just recently made the switch from Windows to Ubuntu, and I'm just a little paranoid when it comes to security measures. I've looked around and from what I've read, security is not as big a concern ...
8
votes
3answers
6k views

See configured rules even when inactive

I'm wondering if it's possible to get UFW to list the configured firewall rules even when it's not enabled. I only have ssh access to the server at this time, and I don't want to enable UFW if there's ...
7
votes
4answers
13k views

What rules to use for UFW?

I've decided to enable the UFW that comes with Ubuntu just to make my system even more secure (especially after watching a video of a person whose computer actually got infected!), and I've enabled ...
7
votes
1answer
2k views

How to set an NFS network?

I want to merge information found here and there in order to record in one answer all steps to set my NFS network between my two Ubuntu PCs This is useful time to time, for example when switching to ...
6
votes
6answers
4k views

UFW firewall still blocking SMB despite adding rules

I have an Ubuntu PC with ufw firewall (GUI version). I have added the preset Samba service, in and out, and even tried adding the ports manually (135-139, 445, UDP and TCP, in and out), but it still ...
6
votes
1answer
17k views

What are ICMP redirects and should they be blocked?

After enabling ufw and the Tiger security auditor, I see warnings saying: The system accepts ICMP redirection messages What are ICMP redirection messages? Should they be disabled for security ...
6
votes
1answer
2k views

Block Ping from a specific IP

I am on a private LAN 192.168.1.0/24. My ip is 192.168.1.3, I want to block only ping requests from 192.168.1.2. I am running ubuntu 11.10. I found two links First tells how to block an IP but not ...
6
votes
2answers
4k views

What do UFW's audit log entries mean?

I'm sometimes getting a lot of these AUDIT log entries in ... [UFW AUDIT] IN= OUT=eth0 SRC=176.58.105.134 DST=194.238.48.2 LEN=76 TOS=0x10 PREC=0x00 TTL=64 ID=32137 DF PROTO=UDP SPT=36231 DPT=123 ...
5
votes
2answers
914 views

Ubuntu comes with firewall by default?

I understand the Ubuntu comes with firwallul UFW is true? There is a GUI for it? if so, what is his name and where do I download? It is possible that UFW notify us (like in windows with a pop-up ...
5
votes
2answers
3k views

Can I uninstall UFW completely?

I need to configure iptables manually and save and restore the rules using iptables-persistent package. so I don't want ufw anymore. I can simply disable it. but many chains are exists in iptables ...
5
votes
2answers
947 views

Is it possible to block a webpage using ufw?

basically I have two machines X and Y. I want to block "http:// <IP-of-Y-Here> /AFolder/" from machine X on HTTP port 80 using ufw. Trivially, this can be completed (awfully) using ufw ...
5
votes
4answers
4k views

Is there a way to keep UFW logging out of dmesg?

There are comments in the /etc/rsyslog.d/20-ufw.conf file that give you the option to keep UFW-events from being logged to the kernel and message logs, which i have done. I would really like to get ...
5
votes
2answers
2k views

What does this UFW log mean?

CC-02 kernel [ 399.656733] [UFW BLOCK] IN=eth0 OUT= MAC= SRC=192.168.2.11 DST=192.168.2.22 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=14158 DF PROTO=TCP SPT=47368 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0 ...
5
votes
1answer
217 views

How do I accept inbound connections for a specific program?

Windows firewall allows to specify a program that will accept inbound connections no matter on which port(s) is listening (instead of specifying the port(s) to allow for that program). Is this ...
4
votes
3answers
6k views

Why UFW has to be (re)started at boot time if it's only iptables rule manager?

README from source package says: When installing ufw from source, you will also need to integrate it into your boot process for the firewall to start when you restart your system. Depending on your ...
4
votes
2answers
195 views

UFW rules don't work with docker

I have a 12.04.4 server, and I have enabled ufw, and have tried to block port 8080. However, it is still open. $ sudo ufw deny 8080 Rule added Rule added (v6) $ sudo ufw status numbered Status: ...
4
votes
3answers
2k views

Firewall Settings for Personal File Sharing

I have ufw set up to allow samba connections, but this does not seem to allow files to be transferred through Ubuntu's "Personal File Sharing" using the Public folder. The share can be seen, but not ...
4
votes
1answer
1k views

How to connect to a CISCO VPN through UFW

I am running Ubuntu 11.04 (64 bits version) and would like to be able to get connected to the VPN server (CISCO) of my company. I am able to get connected to the VPN server when I disable UFW but, ...
4
votes
1answer
1k views

Ban IP by country in UFW

I want to block a country in my server, but I don't know which rule I must use in UFW (or iptables). For example, people from US and other countries can see the site, but visitors from Russia can't. ...
3
votes
2answers
1k views

How to enable IPv6 via miredo along with UFW?

Ubuntu provides some good information on how to enable UFW and on how to enable IPv6 with miredo: https://wiki.ubuntu.com/UncomplicatedFirewall https://wiki.ubuntu.com/IPv6 But what is missing is ...
3
votes
2answers
7k views

How to configure UFW to allow IP Forwarding?

I have UFW, OpenVPN and Virtualbox installed on my home server. I have a host-only network for my virtual machine guests (vboxnet0) set up with the IP range 10.0.1.0, and another IP range of 10.0.0.0 ...
3
votes
1answer
5k views

nfs is blocked by ufw even though ports are opened

I've set up an nfsv4 server and it's working fine, however the firewall is blocking nfs even if port 2049 and 111 are open. I know nfs uses some random ports that change at every boot, but how can i ...
3
votes
1answer
100 views

UFW python documentation

I'm trying to access ufw with python, but on line 53 of backend.py, they raise a weird error that makes no sense: Traceback (most recent call last): File "mymodule.py", line 1467, in ...
3
votes
2answers
3k views

What could be the cause for these strange UFW block entries in my syslog?

I've recently noticed a large number of recurring UFW blocks in my syslog. This surprised me as I have no UFW rules set: $ sudo ufw status verbose Status: active Logging: on (low) Default: deny ...
3
votes
1answer
6k views

Why I'm getting this [UFW BLOCK] in my syslogs?

I wonder why I get this error on my syslogs: [7732763.396193] [UFW BLOCK] IN=eth0 OUT= MAC=02:8b:1a:75:d5:7b:02:8b:1a:40:00:03:08:00 SRC=x.x.x.x DST=x.x.x.x LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=53703 ...
3
votes
2answers
436 views

If I enable ufw, and disable ssh. Is my base install Ubuntu 12.04 safe from the outside world?

I installed Ubuntu 12.04 I then installed Gufw, enabled it and Set every known application setting to "Deny". I never installed sshdaemon so I think its off. My machine still responds to pings... ...
3
votes
1answer
1k views

setting up ufw for a website, I want to to disallow everything except ssh, e-mail, and http

I have read the basic instructions here: https://help.ubuntu.com/community/UFW I want to sudo ufw default deny and then sudo ufw allow ssh sudo ufw allow smtp sudo ufw allow www sudo ufw allow ...
3
votes
2answers
2k views

Why is ufw logging 'BLOCK' messages regarding a port for which ufw is configured to 'ALLOW' connections?

Here's an example log message: May 25 10:36:07 myserver kernel: [7057243.392334] [UFW BLOCK] IN=eth0 OUT= MAC=00:02:55:67:82:eb:00:06:b1:3a:ef:62:08:00 SRC=69.197.128.26 DST=192.168.100.101 LEN=44 ...
3
votes
1answer
131 views

Docker is blocked by UFW

I have problem with Docker network in ubuntu 14.04. I have installed Docker.io from official repo and I've added DEFAULT_FORWARD_POLICY="ACCEPT" to /etc/default/ufw but my Docker containers still ...
3
votes
0answers
314 views

What do these lines in the UFW logfile mean?

These lines are repeated several times, first one at the time when remote ssh connection with the machine is lost (mac address is the address of eth used for Internet connection) Mar 24 21:20:32 ...
3
votes
0answers
860 views

Why is UFW blocking outgoing connections?

UFW is blocking some outgoing connections on my server, such as Akismet, the spam killing plugin for my Wordpress site. According to Akismet's firewall info I need to allow contact with four IPs. My ...
2
votes
2answers
89 views

Why does DEFAULT INCOMING DENY not stop Firefox from working?

If UFW is actually not an application layer firewall but a "interface to iptables", how can it be if I have by DEFAULT INCOMING DENY and OUTGOING ALLOW setting that ANY internet application is ...
2
votes
2answers
1k views

firewall ufw is “enable and active” but gufw is off

question concerning the ufw firewall : sudo ufw enable returns Firewall is active and enabled on system startup sounds fine, but when i start gufw after reboot, it is still off what does that ...
2
votes
3answers
1k views

Why is Ubuntu permissive with outgoing connections by default?

I am pretty newbie to Linux, as most of computers for resources in my school use Linux, I just installed Ubuntu to learn. By default iptables and ufw sets policy as under: IPTABLES -P INPUT DROP ...
2
votes
2answers
90 views

14.04 missing “/etc/init.d/ufw”? my firewall never auto starts

I need to know how to fix the missing "/etc/init.d/ufw" file, is it some package or some command? I used the gufw to enable it, but on reboot my firewall was still off... I created a symlink ...
2
votes
1answer
111 views

ufw firewall disabled - How to turn it back on?

I am using Ubuntu 12.04 and just recently noticed, that my ufw-firewall is turned [off]. I know It's turned [off] by default, but when I set Ubuntu up, I turned [on] the firewall with: sudo ufw, but ...
2
votes
2answers
11k views

How do I allow all possible IPs for Gmail servers through my ufw firewall?

I am currently using the following rule: ufw allow out from my_local_ip to any port 587 This is a little too lax for my liking. I would like to tighten it up and restrict it to only gmail's smtp ...
2
votes
1answer
270 views

Enforce outgoing port for a machine inside LAN

I'm running Ubuntu Server (natty) in as a gateway/firewall in front of a private network. I have successfully enabled IP forwarding and NAT so the machines behind the firewall can connect to Internet ...
2
votes
1answer
529 views

Looking for IPTABLES and UFW readily available, the best proven rules

ok i am up with UBUNTU finally, and liked the distro! particularly ufw, synaptic and software manager. as i am pretty blind newbie to linux, i need some help securing Ubuntu desktop. I've gone ...
2
votes
1answer
3k views

How do I allow local subnets in ufw?

I recently got IPv6 connectivity at home and now I would like to allow connections to my home server via IPv6 from the LAN only. The trick is that the IPv6 address/prefix assigned to the server is ...
2
votes
2answers
743 views

How can I cancel all the current communication from particular IP in Ubuntu 12.04?

I am working on Ubuntu 12.04 firewall. I want to deny any IP on runtime. I am using "ufw deny from IP". It's working for future connections. But it is not cancelling the existing connections like ssh. ...
2
votes
1answer
131 views

Can't Get UFW Firewall to Allow Anything

I'm trying to set UFW (using GUFW) to create a firewall that only allows network connections when OpenVPN is connected. So in GUFW I deny incoming and outgoing connections and enable the Firewall. I ...
2
votes
2answers
225 views

UFW and firewall

So I recently installed ubuntu and I have been working with it no problem.While browsing through the security guides (specifically: https://wiki.ubuntu.com/BasicSecurity) I noticed this: "enable the ...
2
votes
0answers
240 views

Why does UFW seem to slow down wordpress?

I have a speedy install of wordpress going on ubuntu 12.04. Everytime i enable the UFW firewall, things can get really slow. Sometimes fast, sometimes slow, intermittently. Logging on through ssh ...
2
votes
1answer
185 views

Using Ubuntu as a gateway for monitoring and possibly IPS IDS within Active Directory

Ok, I've searched for days, maybe you can point me in the right direction. I have an MPLS scenario with a shared gateway in a multi-domain M$FT AD environment. On the inside of the MPLS all of the ...
2
votes
1answer
2k views

How do I configure ufw to allow ssh on another port? [closed]

I'm having some difficulties at the moment with my Ubuntu SSH server. The only title I could come up with summarizing my situation was too long so here is my problem: I recently discovered the ...
2
votes
0answers
568 views

UFW give errors and won't auto start at boot [closed]

I just tried to enable ufw on my server, it gave me this error : ERROR: problem running ufw-init When I tried the second time, it worked. When I tried to set the default rule "sudo ufw default ...
1
vote
4answers
5k views

Set UFW before.rules without restart of server

I use UFW on my Ubuntu server. Unfortunately there are no rules in UFW to port forward to another machine. What you need to do is edit /etc/before.rules and put routing commands there, for example # ...