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.

learn more… | top users | synonyms

8
votes
2answers
8k views

Ubuntu ufw: set a rule on a per interface basis

I want to create a rule that allows anyone on eth1 to access port 80. Can UFW do this or should I go back to using Shorewall? To clarify: this is a capabilties question, can ufw handle interfaces as ...
8
votes
1answer
12k views

Can I use ufw to setup a port forward?

Im currently using ufw to enforce some basic firewall rules. Is it possible to also use ufw to do port forwarding? Specifically im wanting to forward incoming traffic to my server (same machine ...
7
votes
4answers
4k views

Where does UFW (uncomplicated firewall) save command-line rules to?

You add a rule like this: ufw allow 22/tcp The rule is saved, and is applied even after reboot. But it's not written anywhere in /etc/ufw. Where is it saved to? (Ubuntu, using ufw as ...
7
votes
3answers
4k views

Rate limiting with UFW: setting limits

UFW's man page mentions that it can setup iptables rate limiting for me: ufw supports connection rate limiting, which is useful for protecting against brute-force login attacks. ufw ...
7
votes
1answer
999 views

UFW logs blocked request on open port, what am I missing?

Nov 29 15:17:15 hostname kernel: [397768.554884] [UFW BLOCK] IN=eth0 OUT= MAC=[mac] SRC=[ip] DST=[ip] LEN=52 TOS=0x00 PREC=0x00 TTL=52 ID=17050 PROTO=TCP SPT=56152 DPT=80 WINDOW=65535 RES=0x00 ...
6
votes
1answer
1k views

Copy UFW rules between servers

I'm doing a hardware refresh on a my Colo, I just need to copy my UFW rules from my old server to my new server. I dont seem to be able to get them copy all the active rules from my old server to my ...
5
votes
1answer
220 views

What's the effect of iptables/ufw deny filters on server load?

I'm wondering how scalable it is to add IP addresses or subranges I want to block into ufw. E.g., I do this whenever I discover a particularly bad bot or server farm. As my list grows, I wonder how ...
4
votes
2answers
2k views

ufw blocking apt and dns

I installed ufw on my Debian system like the following: # aptitude install ufw # ufw limit 22 # ufw allow 80 # ufw allow 443 # ufw enable # ufw status verbose Status: active Logging: on (low) ...
4
votes
1answer
1k views

Cannot loopback to localhost php gateway causing nginx to timeout while setting up firewall with ufw

I'm setting up ufw for the first time. Using Ubuntu 10.04 LTS on an OpenVZ VPN and have the following rules: sudo ufw allow 22/tcp sudo ufw allow 25/tcp sudo ufw allow 53 sudo ufw allow 80 sudo ufw ...
4
votes
2answers
3k views

Correctly setting up UFW on Ubuntu Server 10 LTS which has Nginx, FastCGI and MySQL?

I'm wanting to get my firewall on my new webserver to be as secure as it needs to be. After I did research for iptables, I came across UFW (Uncomplicated FireWall). This looks like a better way for me ...
3
votes
1answer
1k views

Should I be using iptables or ufw?

I know of iptables. I know of ufw. I've been using ufw in the past just because it's easier to setup and use. However, which one should I be using? Is iptables more secure? Is ufw more stable? I ...
3
votes
2answers
5k views

opening port 80 on Ubuntu AWS

I'm running a tomcat server on an ubuntu machine hosted in an AWS instance. I can reach the server via public_ip:8080 but when i change the listening port on server.xml from 8080 to 80 connection is ...
3
votes
1answer
2k views

Where are the logs for ufw located on Ubuntu Server?

I have an Ubuntu server where I am blocking some IPs with ufw. I enabled logging, but I don't know where to find the logs. Where might the logs be or why might ufw not be logging?
3
votes
2answers
234 views

Which UFW messages can logcheck safely ignore?

Logcheck currently sends lots of emails with messages like this Jun 6 19:31:44 <hostname> kernel: [UFW BLOCK] IN=eth0 OUT= MAC=<mac-address> SRC=<source-ip> ...
3
votes
1answer
2k views

Turning on UFW stops my e-mail client functioning (both imap and smtp) even though they are allowed?

I am using ubuntu 10.04 on a VPS. Without enabling UFW everythign works fine - imap using port 143. And sends emails using smtp port 587. However, when I turn on UFW a lot of problems are ...
3
votes
1answer
3k views

Depend on a resource only if it exists in Puppet

I have a class for enabling firewall on nodes (using ufw, in Ubuntu): class ufw { package { ["ufw"]: ensure => latest } exec { "enable-firewall": command => "/usr/bin/yes | ...
3
votes
1answer
106 views

ufw cancel port forward

On Ubuntu server 14.04, I enabled ufw port forwarding from 80 to 8181 (tcp) by using the checked answer on Can I use ufw to setup a port forward? Finally I'd rather proxy http request using apache2 ...
3
votes
1answer
615 views

Ubuntu Server 12.04: How does one configure the firewall during installation?

I'm following instructions to automate the installation of Ubuntu Server 12.04 using kickstart. It works well for automatically partitioning the drives, selecting languages etc. However, it doesn't ...
3
votes
1answer
873 views

How to place a virtual machine in DMZ?

I have an Ubuntu 12.04 server running few virtual machines with KVM. I would like to expose some of these virtual machines on the internet, to make it possible for customers to test the products ...
3
votes
1answer
916 views

UFW/IPTables: how to securely allow authenticated git access with github

This is how I setup my iptables with UFW: sudo ufw default deny incoming (deny all incoming) sudo ufw default deny outgoing (deny all outgoing) sudo ufw allow out 53 (accept outgoing DNS traffic, ...
3
votes
2answers
4k views

Opening port 5432 on ubuntu

I am trying to open port 5432 on ubuntu using ufw using sudo ufw allow 5432/tcp I then use nmap to see if port 5432 was opened and i get this: root@domain:~# sudo nmap -sS -O 127.0.0.1 Starting ...
3
votes
3answers
2k views

Disable connection tracking with UFW for port 80

During load testing my server is dropping packets due to "connection tracking" way before it's running out of resources. I'm using Ubuntu Jaunty with ufw. In my syslog I get: ip_conntrack: table ...
3
votes
1answer
233 views

UFW: Disable logging of blocks due to optional FIN/ACK message being received

I've recently built a server and decided to use UFW for the first time. I was investigating a possible connection issue (turns out it was their end) but I noticed that the logs are full of entries ...
2
votes
2answers
517 views

How to show the current configuration of iptables with ufw?

This is what I get when I try to see the current iptables configuration: nes@sw-eng:~$ sudo ufw show ERROR: Unsupported action 'show' So, what else is there?
2
votes
1answer
317 views

Recommended ufw port configuration to secure tomcat web-application ubuntu server?

Assuming an ubuntu server operating web applications on Tomcat (with redirection from apache 80 to 8080). What is the recommended port configuration to secure the server? Thanks. P.S.: I would like ...
2
votes
1answer
1k views

UFW blocking port 80 when it should not

I have these rules in UFW (default deny): 80 ALLOW 10.0.0.0/8 443 ALLOW 10.0.0.0/8 80 DENY Anywhere 443 ...
2
votes
1answer
1k views

Ubuntu: How to add an iptables rule that UFW can't create

UFW is working really well for me except in the cases where it doesn't... I want to be able to add another rule manually that will be applied on boot? where should i put this rule? how should I ...
2
votes
1answer
356 views

UFW - can I add a domain?

This will work fro the docs: sudo ufw allow proto tcp from 192.168.0.2 to any port 22 But..will this work? sudo ufw allow proto tcp from foo.bar.com to any port 22 I am using ubuntu 12.04
2
votes
1answer
398 views

Can ufw on a kvm host restrict traffic to guests?

I've set up a number of guests running on kvm on Ubuntu. Network access for the guests is via network bridge with br0 sitting on top of eth0. I have ufw running on the host machine and this is ...
2
votes
1answer
148 views

Cannot directly reject traffic on port 25

My server is running Ubuntu 10.04.4 LTS and I want to reject traffic to port 25. The goal is this: $ telnet {ip} 25 Trying {ip}... telnet: connect to address {ip}: Connection refused telnet: Unable ...
2
votes
0answers
2k views

ufw deny all incoming and outgoing not working!

I'm sure I'm doing something wrong. I'm expecting my current rules of "denying all incoming/outgoing" to cripple anything network related, but it's not. First, I did: sudo ufw default deny incoming ...
1
vote
3answers
405 views

Is this a security breach?

I have a server running Ubuntu 10.04LTS (I know it is too old), which over the last couple of weeks has on occasion been unresponsive to network traffic, and needed a hard reset first thing in the ...
1
vote
3answers
369 views

Locking down my Ubuntu server with UFW [duplicate]

I'm using Ubuntu 12.04 on an Amazon EC2 instance and new to the sysadmin side of things. I'm working on a little project of my own and I'm already starting to get targeted by bots (at least I hope ...
1
vote
3answers
4k views

ufw portforwarding to virtualbox guest

My goal is to be able to connect using remote desktop on my desktop machine, to windows xp running in virtualbox on my linux server. My setup: server = debian squeeze, 64 bit, with a public IP ...
1
vote
2answers
1k views

UFW/IPTables: after setting default outgoing deny, and port 80 outgoing allow, curl still doesn't work

With UFW, I disabled all outgoing and ingoing traffic by default. However, I do allow port 80 in and out: sudo ufw default deny incoming (deny all incoming) sudo ufw default deny outgoing (deny all ...
1
vote
3answers
3k views

what's wrong with my ufw configuration on Ubuntu server?

I've setup the ufw firewall for my Ubuntu server on linode as follows: Note that this is in the Lish terminal, unfortunately as soon as I turn on the ufw, I cannot: view my test website via port ...
1
vote
2answers
522 views

Firewall blocking some strange communications from source-port 22 to over-seas ip addresses. Should I be concerned?

I'm responsible for a server that serves a single service (ssh) over the internet via port-forwarding through a firewall. The ssh service login is limited to encryption-key only (no passwords ...
1
vote
1answer
5k views

UFW on Ubuntu to Allow All Traffic on LAN

I want to allow all LAN traffic to my Ubuntu server. I have read the documentation and see the command, but when I try to edit the command for my IP range I get an error. How can I allow all traffic ...
1
vote
3answers
492 views

Testing the limits of UFW with thousands of deny blocks

Here's the deal: I have a persistent Chinese botnet that spams my forum (running on an Ubuntu 12.04.2 server on nginx, etc). I've been using UFW (Ubuntu's "Uncomplicated FireWall") for managing the ...
1
vote
1answer
1k views

UFW Firewall Rules ordering?

I have the following rules on our server within UFW: To Action From -- ------ ---- 22 ALLOW 217.22.12.111 22 ...
1
vote
2answers
1k views

Cant forward port 443 to 8443 without allowing 8443 on ufw

I configured port forwarding through iptables and ufw. But there is something I do not understand, I just cant get iptables to forward port 443 to 8443 without allowing port 8443 on UFW. I want port ...
1
vote
2answers
312 views

The most efficient way to setup MySQL on Ubuntu Server 10 LTS?

This question was originally on stackoverflow.com, but I was told I may get a better answer on this site... Very soon I will setting up a web server for a client who has a very busy site. He has a ...
1
vote
3answers
613 views

Upgrading to ufw on Ubuntu 9.04

I've recently upgrade my Ubuntu server install to 9.04. I'd like to install and use ufw. Is there a way to import my existing iptables into ufw? I'm worried about switching it on, and having all my ...
1
vote
1answer
45 views

Security implications of setting UFW default_forward_policy to accept?

The docker manual (http://docs.docker.com/installation/ubuntulinux/#docker-and-ufw) states that it's nescessary to set UFWs DEFAULT_FORWARD_POLICY to "ACCEPT" so docker containers can reach each ...
1
vote
1answer
133 views

Trouble with Fail2Ban UFW Portscan Filter

I'm trying to create a filter for fail2ban that recognises port scans in the UFW logs. I've confirmed my ban action is working correctly on other filters and am having trouble creating the correct ...
1
vote
1answer
309 views

iptables DNAT port forward to another machine on LAN

I am trying to implement iptables forwarding rules in order to internally redirect packets coming through a specific port. My machine is running under the distribution Ubuntu Server 12.04.3, with UFW ...
1
vote
1answer
74 views

Setting up ufw without locking yourself out

Basically I want to protect a Ubuntu server with a firewall and sided for ufw. The big problem is that I don't have physical access to the server, neither is it possible to force a reboot or revert to ...
1
vote
1answer
394 views

Amazon EC2 Servers with syslog-ng communication

I have 3 Amazon EC instances with ubuntu 12.04 Production Server (LAMP Server w/o MYSQL, syslog-ng client) Development Server (LAMP w/ MYSQL, syslog-ng client) Logging Server (syslog-ng Server) I ...
1
vote
1answer
171 views

Blocking a service to countries with UFW

I am using UFW trying to block SSH access from multiple countries. I have been successful completely blocking access but I need a refinement: The server needs to allow world access to other services ...
1
vote
1answer
2k views

UFW: force traffic thru OpenVPN tunnel / do not leak any traffic

I have VPN access using OpenVPN and try to create a safe machine that does not leak traffic over non-VPN interfaces. Using the firewall UFW I try to achieve the following: Allow Access from LAN to ...