Dietpi Firewall Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
midacts
Posts: 2
Joined: Sun Mar 08, 2020 12:53 am

Dietpi Firewall

Post by midacts »

Is there some kind of firewall running on DietPi?

i've ran this and new records get added later automatically:

```bash
iptables-legacy -P INPUT ACCEPT
iptables-legacy -P FORWARD ACCEPT
iptables-legacy -P OUTPUT ACCEPT
iptables-legacy -t nat -F
iptables-legacy -t mangle -F
iptables-legacy -F
iptables-legacy -X
```

I'm trying to run K3S and host services, but i can't connect to the nodeport externally (but i can hit the port if i ssh into the host itself).
Firewall related : [
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi Firewall

Post by Joulinar »

by default, DietPi did not contain a Firewall. Thinks like this would need to be installed by the user.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
midacts
Posts: 2
Joined: Sun Mar 08, 2020 12:53 am

Re: Dietpi Firewall

Post by midacts »

Not really sure but i have it working.
Maybe something else was going on.
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: Dietpi Firewall

Post by WarHawk »

Honestly the easiest way to setup a "stateful" firewall with pinholes for SSH and (insert other services here) would be to install UFW

https://www.digitalocean.com/community/ ... oud-server
By default the above install allows all out, and blocks all in except port 22 for ssh and those that have been initiated from the machine itself), simple commands allow whatever you want thru from then
Post Reply