Questions tagged [ufw]

ufw is the default firewall application for Ubuntu Linux.

112 questions
15
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
  • 251
  • 1
  • 2
  • 5
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
  • 2
  • 6
  • 14
6
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…
whiskers75
  • 163
  • 1
  • 6
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,434
  • 11
  • 40
  • 62
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 ├─…
silvernightstar
  • 331
  • 1
  • 5
  • 19
5
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
  • 2,687
  • 13
  • 43
  • 58
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
  • 2
  • 8
5
votes
0 answers

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…
Mark Johnson
  • 71
  • 1
  • 5
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
  • 2
  • 4
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
  • 1
  • 2
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",…
zung nguyen
  • 43
  • 1
  • 5
4
votes
5 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
  • 305
  • 1
  • 3
  • 9
4
votes
2 answers

How to make a VPN kill-switch for mac OS X

What I wanna do is to have the internet connection disabled completely when the VPN connection goes down. I am connecting to my VPN (privatevpn.com) through Viscosity. I have tried everything in the book. I have tried to have a disconnect scripts in…
John Schlong
  • 41
  • 1
  • 2
4
votes
0 answers

What exactly are the security implications of ufw DEFAULT_FORWARD_POLICY “ACCEPT”?

I found this question asked on Serverfault, but the answer just provided alternatives instead of actually detailing the implications. I had to set DEFAULT_FORWARD_POLICY to "ACCEPT" to be able to connect to my docker applications, even behind an…
ROODAY
  • 233
  • 2
  • 13
3
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…
1
2 3 4 5 6 7 8