Skip to content
Snippets Groups Projects
iptables-rules 419 B
Newer Older
  • Learn to ignore specific revisions
  • Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    #!/bin/bash
    
    stop() {
    
        # se facciamo reboot tutte le volte questo non serve, ma si potrebbe prevedere
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
            #/usr/sbin/iptables-restore </etc/sysconfig/iptables
        :
    }
    
    start() {
    
        /usr/sbin/iptables-restore </local/iptables
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    }
    
    case "$1" in
    'start')
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    'stop')
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    'restart')
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    *)
    
        echo "Usage: $0 { start | stop | restart }";
        exit 1;
        ;;
    
    Alberto LIVIO BECCARIA's avatar
    Alberto LIVIO BECCARIA committed
    esac
    exit 0