Go to file
2017-08-15 14:42:27 +02:00
.gitignore Add some comments for DNS rules. 2017-06-02 11:34:43 +02:00
ip6t-firewall-server Some minor changes on script output. 2017-08-15 14:42:27 +02:00
ip6t-firewall-server.conf.sample Add rule to prevent bridged traffic getting pushed through the host's iptables rules if requested (do_not_firewall_bridged_traffic). 2017-08-15 14:04:18 +02:00
ipt-firewall-server Some minor changes on script output. 2017-08-15 14:42:27 +02:00
ipt-firewall-server.conf.sample Add rule to prevent bridged traffic getting pushed through the host's iptables rules if requested (do_not_firewall_bridged_traffic). 2017-08-15 14:04:18 +02:00
README.bridge Initial import 2017-02-12 16:07:07 +01:00
README.systemd.server Initial import 2017-02-12 16:07:07 +01:00

## - Create a systemd service
## -

# IPv4
#
cat <<EOF >> /etc/systemd/system/ipt-firewall.service
[Unit]
Description=IPv4 Firewall with iptables
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/sbin/ipt-firewall-server start
ExecStop=/usr/local/sbin/ipt-firewall-server stop
User=root

[Install]
WantedBy=multi-user.target
EOF

# IPv6
#
cat <<EOF >> /etc/systemd/system/ip6t-firewall.service
[Unit]
Description=IPv6 Firewall with ip6tables
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/sbin/ip6t-firewall-server start
ExecStop=/usr/local/sbin/ip6t-firewall-server stop
User=root

[Install]
WantedBy=multi-user.target
EOF


## - Eanable script (for autostart at boot time)
## -
systemctl enable ipt-firewall.service
systemctl enable ip6t-firewall.service

## - Reload systemd configuration
## -
systemctl daemon-reload


## - Start Services
## -
systemctl start ipt-firewall
systemctl start ip6t-firewall


## - Add to /etc/rc.local
## -
## -    sleep 2
## -    systemctl restart ipt-firewall || /bin/true
## -    systemctl restart ip6t-firewall || /bin/true