[options]
#       UseSyslog
logfile = /var/log/knockd.log

interface = eth0

[openSSH]
        sequence    = 1972,2005,1804,1998
        seq_timeout = 5
        command     = /sbin/iptables -A INPUT -s %IP% -p tcp --dport 22 -j ACCEPT -m comment --comment "knockd SSH `date +%d_%b_%Y-%H:%M`"
        tcpflags    = syn

[closeSSH]
        sequence    = 1998,1804,2005,1972
        seq_timeout = 5
        command     = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
        tcpflags    = syn

[openRDP]
        sequence    = 1965,1972,1103,1203
        seq_timeout = 5
        command     = /sbin/iptables -A FORWARD -s %IP% -p tcp --dport 3389 -j ACCEPT -m comment --comment "knockd RDP `date +%d_%b_%Y-%H:%M`"
        tcpflags    = syn

[closeRDP]
        sequence    = 1203,1103,1972,1965
        seq_timeout = 5
        command     = /sbin/iptables -D FORWARD -s %IP% -p tcp --dport 3389 -j ACCEPT
        tcpflags    = syn
