123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/bash
- # /etc/rc.d/rc.nftables
- # by ans for slackware14.2
- # ansenrod@cryptolab.net
- start(){
- /usr/sbin/nft -f /etc/nftables/nftables.conf
- echo "nftables inicialized"
- }
- stop(){
- /usr/sbin/nft flush ruleset
- echo "nftables stoped"
- }
- case "$1" in
- start)
- start
- ;;
-
- stop)
- stop
- ;;
-
- restart)
- stop
- sleep 1.5
- start
- ;;
-
- *)
- echo "Usage: $0 (start|stop|restart)"
- esac
|