minifirewall/README.md

45 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2019-06-04 16:48:27 +02:00
Minifirewall
=========
Minifirewall is shellscripts for easy firewalling on a standalone server
2020-08-24 16:59:15 +02:00
we used nftables https://wiki.nftables.org/ designed for recent Linux kernel
2019-06-04 16:48:27 +02:00
See https://gitea.evolix.org/evolix/minifirewall
## Install
~~~
2020-08-24 16:59:15 +02:00
install -m 0700 minifirewall.service /etc/systemd/system/minifirewall.service
install -m 0700 minifirewall-start.sh /usr/local/sbin/minifirewall-start.sh
install -m 0700 minifirewall-stop.sh /usr/local/sbin/minifirewall-stop.sh
2019-06-04 16:48:27 +02:00
install -m 0600 minifirewall.conf /etc/default/minifirewall
~~~
## Config
Edit /etc/default/minifirewall file:
* If your interface is not _eth0_, change *INT* variable
* Modify *INTLAN* variable, probably with your *IP/32* or your local network if you trust it
* Set your trusted and privilegied IP addresses in *TRUSTEDIPS* and *PRIVILEGIEDIPS* variables
* Authorize your +public+ services with *SERVICESTCP1* and *SERVICESUDP1* variables
* Authorize your +semi-public+ services (only for *TRUSTEDIPS* and *PRIVILEGIEDIPS* ) with *SERVICESTCP2* and *SERVICESUDP2* variables
* Authorize your +private+ services (only for *TRUSTEDIPS* ) with *SERVICESTCP3* and *SERVICESUDP3* variables
* Configure your authorizations for external services : DNS, HTTP, HTTPS, SMTP, SSH, NTP
## Usage
~~~
2020-08-24 16:59:15 +02:00
systemctl start/stop/restart minifirewall.service
2019-06-04 16:48:27 +02:00
~~~
2019-06-04 16:48:27 +02:00
If you want to add minifirewall in boot sequence:
2019-06-04 16:48:27 +02:00
~~~
systemctl enable minifirewall
~~~
## License
This is an [Evolix](https://evolix.com) project and is licensed
under the GPLv3, see the [LICENSE](LICENSE) file for details.