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.

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.

479 questions
17
votes
2 answers

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 make it start at boot? how do I make it play nicely…
Arthur Ulfeldt
  • 3,249
  • 9
  • 33
  • 40
16
votes
2 answers

ufw deny from ip doesn't seem to be working

I've been tailing my server's access log while working today, and have noticed one of my client's wordpress sites getting hammered with login attempts from an IP from out of the country. I wanted to deny access from this IP address and tried the…
rmmoul
  • 275
  • 1
  • 2
  • 8
15
votes
3 answers

How do I use ufw to open ports on ipv4 only?

Whenever I run a command like ufw allow 22, ufw automatically adds the firewall rules to both ipv4 and ipv6. If I want to only open a port on ipv4, is there a way to do so? Something like ufw allow 22 proto ipv4.
RalphORama
  • 293
  • 1
  • 3
  • 6
14
votes
1 answer

Remove UFW Block from kern.log and sys.log

Using Nginx, Wordpress and Ubuntu 16. I am constantly bombarded with these messages in kern.log , syslog and ufw.log Nov 28 21:02:28 kernel: [246817.450026] [UFW BLOCK] IN=eth0 OUT= MAC=xx.xx SRC=122.3.133.77 DST=xx.xx LEN=60 TOS=0x00 PREC=0x00…
JoaMika
  • 499
  • 2
  • 9
  • 21
14
votes
2 answers

How to make netstat on Linux only show OUTBOUND tcp connections?

My ubuntu server is infected and there is a process making a bunch of HTTP requests to a bunch of websites (sucks!). I have added the following to my firewall (UFW): sudo ufw deny out proto tcp to any port 1:65535 To Action …
David Coch
  • 141
  • 1
  • 1
  • 5
14
votes
1 answer

Ufw and Iptables. Which is better and why?

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 whether these are similar or not. I know ufw is a…
HelloWorld
  • 243
  • 1
  • 2
  • 5
11
votes
2 answers

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 refused by remote host. Port number 80 is enabled…
gesus
  • 219
  • 1
  • 2
  • 6
10
votes
1 answer

Why does UFW not block the ports that have been exposed using docker?

I've setup some rules on my ufw but I think it's just not blocking anything. This is its current status: ~# ufw status verbose Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip To …
Ivan
  • 313
  • 1
  • 5
  • 11
9
votes
2 answers

Does order of UFW rules matter?

When I first initialized my ufw, I did ufw default allow outgoing ufw default deny incoming ufw allow 80/tcp ufw allow 22/tcp Over the last week or so, I've been going through my access logs and banning IPs that are making malicious requests on my…
Thank you
  • 269
  • 3
  • 8
9
votes
1 answer

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 other. What's the security implication of doing so on…
Niko
  • 261
  • 3
  • 7
8
votes
2 answers

How to disable UFW Ubuntu externally for AWS EC2?

I am using amazon EC2. I enabled UFW in my server and without adding any other rule I logged out. Now since there was no rule specified, I am not able to login to SSH and because of it even my website is down. Can someone help me in how to disable…
Cheran Prakash
  • 171
  • 1
  • 5
7
votes
7 answers

How to delete all ufw rules for a certain port?

I am using ansible to configure ufw on my DB servers to only let accept connections from certain servers connection to a specific port (lets say 1234). When a server that used to have access is taken out of the pool, it might be forgotten to remove…
Benjamin
  • 191
  • 1
  • 1
  • 5
7
votes
2 answers

Configure ufw to redirect http traffic to another IP

I'm trying to redirect all HTTP/HTTPS trafic from one server to another (via IP). I do use the ufw firewall. How can I configure it do to so?
Olivier
  • 415
  • 3
  • 5
  • 15
7
votes
1 answer

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 Nmap 5.21 ( http://nmap.org ) at 2011-12-01 14:28…
Gandalf
  • 245
  • 1
  • 3
  • 7
7
votes
1 answer

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 ACK FIN URGP=0 As I understand it, there was a…
Markus Hedlund
  • 1,127
  • 2
  • 19
  • 33
1
2
3
31 32