#!/bin/bash
sudo modprobe iptable_filter
sudo modprobe ip_queue
#sudo iptables -F INPUT
#sudo iptables -F
#let's make it fair and initialize the input chain before knockd has to
#sudo iptables -I INPUT 1 -i eth0 -p tcp -s 10.10.0.1/255.255.255.0 -j DROP
#sudo iptables -A INPUT -i eth0 -p tcp --syn -j QUEUE

#sudo ./knockd -v -D -n -i lo -s -c knockd.conf
#sudo ./knockd -n -v -D -i eth0 -s -c knockd.conf
sudo ./knockd -n -i eth0 -s -c knockd.conf

#clean up
#sudo iptables -F INPUT
#sudo iptables -F
#sudo iptables -I INPUT 1 -i eth0 -p tcp -s 10.10.0.1/255.255.255.0 -j DROP

