52 lines
1.0 KiB
Markdown
52 lines
1.0 KiB
Markdown
## Iptables systemd files for SuSe installations
|
|
|
|
These files allow iptables and ip6tables to be installed and run as a system service
|
|
|
|
## Important
|
|
|
|
edit the files in sysconfig to match your preffered iptables configuration.
|
|
the default allows ssh access (22/tcp) to the host only.
|
|
|
|
## Scripted installation
|
|
|
|
```
|
|
bash -c "$(curl -fsSL https://git.xo.nl/marcel/iptables/raw/master/install.sh)"
|
|
```
|
|
|
|
## Manual installation
|
|
|
|
- Install iptables
|
|
```
|
|
zypper install iptables iptables-nft-backend
|
|
```
|
|
|
|
- Clone this GIT repo :
|
|
```
|
|
git clone https://git.xo.nl/marcel/iptables
|
|
```
|
|
|
|
- Copy the init files to /usr/libexec
|
|
```
|
|
mkdir -m /usr/libexec/iptables
|
|
cp libexec/*.init /usr/libexec/iptables
|
|
chown root:root /usr/libexec/iptables/*.init
|
|
chmod ug+x /usr/libexec/iptables/*.init
|
|
```
|
|
|
|
- Copy the systemd files to /etc/systemd/system
|
|
```
|
|
cp systemd/* /etc/systemd/system
|
|
systemctl daemon-reload
|
|
```
|
|
|
|
- Copy the default configuration to /etc/sysconfig
|
|
```
|
|
cp config/* /etc/sysconfig
|
|
```
|
|
|
|
- Enable iptables on next boot
|
|
```
|
|
systemctl enable iptables ip6tables
|
|
```
|
|
|
|
Reboot your host |