shasum
Posts: 19
Joined: Sun Jun 21, 2020 1:48 pm

Shortest possible firewall rule set

Sun Jun 21, 2020 3:46 pm

There's a lot of webpages out there that try to explain the ins and outs of firewall rules.
Often these webpages seem to be oriented to people configuring servers.
I'm just setting up a Rpi 8GB, which BTW is great.
I'm curious what would be the shortest possible firewall rule set, either for iptables or ufw, to do the following:
1. Block all incoming packets unless they're a part of an ongoing connection.
2. Don't block outgoing packets (yet).
3. Let my processes talk to one another.
Any ideas?
In the future I may want to block outgoing connections for ports that are uncommonly used i.e. not http, https, mail, time, coin-related etc.

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: Shortest possible firewall rule set

Sun Jun 21, 2020 6:07 pm

sudo apt ufw install

sudo ufw allow <your services eg. ssh>

sudo ufw enable

I can't imagine why you would want to block outgoing ports, it is only going to give you grief. Tell me what harm you think you would be preventing?

Return to “General discussion”