Questions tagged [ufw]

ufw is the default firewall application for Ubuntu Linux.

127 questions
16
votes
6 answers

Is it possible to put UFW on CentOS?

If so, how would I do it? If not, is there an easier way to set some basic rules on CentOS other than iptables? I'm more of an app developer and less of a sys admin.
tybro0103
  • 261
13
votes
1 answer

Enable access to host service with ubuntu firewall from docker container

I have a service running on a host at port 8545. I have several docker containers which need access to this service on the host. The host is running ubuntu. I've successfully configured extra_hosts: - "host.docker.internal:host-gateway" in the…
11
votes
3 answers

UFW is active but not enabled why?

I was trying to setup a firewall in my Ubuntu 12.04 machine. After some struggling I got the following. Isn't this sounds a bit odd? thomas@thomas-K40IJ:~$ sudo ufw status verbose Status: active Logging: on (low) Default: deny (incoming), allow…
Thomas
  • 497
11
votes
6 answers

Ubuntu: Delete several ufw rules

How can several ufw rules be deleted at once? By using $ ufw status numbered Status: Aktiv Zu Aktion Von -- ------ --- [ 1] 80/tcp ALLOW IN …
bobbolous
  • 395
6
votes
2 answers

Open up firewall automatically to anybody who has successfully connected via SSH

I have a server which runs a few services. However, for security reasons, I configured the server so that nothing, except for SSH, is accessible from outside. What I'd like to do instead, though, is to have the server allow access to all its…
houbysoft
  • 4,444
6
votes
1 answer

What are the advantages of ufw, is it really needed?

I am quite enough familiar with iptables and I find iptables -L -v easy enough to read. Backuping is easy and I am happy with that. However in recent versions of Ubuntu there is ufw that quite pollute iptables. Insead of a clean list of rules I have…
nowox
  • 3,017
5
votes
2 answers

Using Raspberry Pi as IPv6 router for network

I've succeeded in setting up IPv6 for my Raspberry Pi with tunnelbroker.net. However, I would like to share the /64 I got amongst the other devices in my network. The router of the network is a Virgin Media Super Hub (VMDG480), and has no IPv6…
5
votes
2 answers

How to block a particular computer behind a NAT

I run a small hostel and have the following network configuration: Router1 (192.168.1.1) ─┬─ (192.168.1.2) Ubuntu Samba+SSH Server ├─ (192.168.1.X) Router 2 (192.168.2.1) ─┬─ (192.168.2.X) GuestPC1 ├─…
5
votes
1 answer

Allow a list of IP addresses to access ports with UFW

I want to allow a list of (around 100) IP addresses to access a website on an ubuntu server. I'd like to be able to refresh the list via cron. I'm trying to do it with UFW. I thought this might be easier to do via an app profile. Is this the best…
Will
  • 161
5
votes
1 answer

Still unable to access Internet from Docker containers

Followed the https://stackoverflow.com/a/46266757 ("What is the best practice of docker + ufw under Ubuntu" answer by @mkubaczyk) guide to configure Docker with UFW properly but still unable to access Internet in containers. What could the problem…
Te Ri
  • 255
5
votes
1 answer

How do I kill existing network connections on Linux?

I've been working on a project that is nearly complete: to be able to kill my children's internet connections at the touch of a button. I've implemented part of the solution by basically calling: ufw deny from IP The threat of killing their…
5
votes
2 answers

Ubuntu 14.04: enabled ufw and forgot to allow ssh

Last night I did a most annoying mistake. On a Ubuntu 14.04 server I enables ufw and forgot to allow ssh. Then I logged off. Naturally I am now locked out with ssh. Fortunately my hoster provides a repair feature that enables me to access ther…
caliph
  • 201
4
votes
1 answer

Block applications using UFW

I am using Ubuntu 14.04 desktop. I want to block certain applications from accessing internet and allow some. Can this be done using UFW ? If yes, how ? If no, can it be done by any other method ? I do not want to use GUFW. I am able to block by IP…
jacky
  • 51
4
votes
2 answers

enabling ufw failed with Ubuntu from WSL2

It is a fresh install of Ubuntu 20.4 or Ubuntu 22.04 but they all failed when I tried to enable ufw with errors as below from a Ubuntu console. sudo ufw enable Traceback (most recent call last): File "/usr/lib/python3/dist-packages/ufw/util.py",…
4
votes
2 answers

Syntax for ufw app profiles, specifically to define interfaces and IP addresses

After googling several sites and browsing through the [man page][1], I still come up short with an exact definition of the syntax of the application profiles for ufw rules. All examples you find of the web are really simple ones and don't reflect a…
1
2 3
8 9