This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:iptables [2019/04/24 11:01] – [Set/ Save IP-Tables] tmade | linux:iptables [2019/04/24 11:08] (current) – [Systemd] tmade | ||
---|---|---|---|
Line 8: | Line 8: | ||
https:// | https:// | ||
- | + | ==== SLES ==== | |
- | ==== Set/ Save IP-Tables | + | |
- | + | ||
- | === SLES === | + | |
1. Step: IP-Tables will be set: | 1. Step: IP-Tables will be set: | ||
Line 51: | Line 48: | ||
iptables -t nat -L -vn | iptables -t nat -L -vn | ||
- | === Systemd === | + | ==== Systemd |
- | Create a executable script | + | Create a executable script (e. g.: "chmod 750 / |
- | <code bash> | + | <code bash iptables.sh> |
#!/bin/bash | #!/bin/bash | ||
# Configure iptables | # Configure iptables | ||
Line 115: | Line 112: | ||
EOF | EOF | ||
</ | </ | ||
+ | |||
+ | Update systemd: | ||
+ | |||
+ | systemctl daemon-reload | ||
+ | |||
+ | Usage: | ||
+ | |||
+ | systemctl start iptables.service | ||
+ | systemctl stop iptables.service | ||
+ | systemctl status iptables.service | ||
+ | systemctl is-enabled iptables.service | ||
+ | systemctl enable iptables.service | ||