|
|
 |
Eggdrop iptables firewall rules |
December 6, 2006
Do you run a bunch of networked eggdrops on Linux? You realize they talk to each other over telnet which is unencrypted right? You didn't know that? Hmm.. Here's how you lock your hub bot down so it only talks to leaf bots from trusted hosts:
LEAFS=("12.34.56.78" "21.43.65.87")
for LEAF in ${LEAFS[@]}; do
iptables -A INPUT -s ${LEAF} -i eth0 -p tcp \
--dport 3333 -j ACCEPT
iptables -A INPUT -s ${LEAF} -i eth0 -p tcp \
--dport 2010:2020 -j ACCEPT
done
iptables -A INPUT -i eth0 -p tcp --dport 3333 -j DROP
iptables -A INPUT -i eth0 -p tcp --dport 2010:2020 -j DROP
|
|
Book Recommendation:
Programming Ruby is the defacto-standard for learning to program in Ruby. If someone tells you to pick up a copy of “the pickaxe book”, this is the one they mean. This book goes through the entire Ruby language, step-by-step, teaching you each basic concept. This is the second edition, which is expanded to include over 200 pages of new content, covering all the improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections: an acclaimed tutorial on using Ruby, the definitive reference to the language, complete documentation on all built-in classes, modules, and methods, and complete descriptions of all 98 standard libraries. Needless to say, it’s very thorough. This book is great for beginners but also makes an excellent reference for the pros. |
|
Danger
By: Anticept <Anticept at anticeptsworld dot net>
Posted: 1 year ago
Be wary of the iptables -F command in this script. If you have no physical access to the box, you will block yourself out if your iptables default access is to drop packets.