Skip to contentSkip to conversation

help with whitelist

DISCUSSION Joey 1 participant 1 message Oct 29, 2008

lore
Share & tools
lore

Joey

author
#0 lore raw

Hello All,

I have been refining my iptables code and have perfected the blocking side ( thanks to all who helped! ). Rules here http://web56.net/iptables-save.cfg

But now, I need to create some whitelist entries.

Lets say I have a block rule of 207.144.68.0/24 and I need to whitelist 207.144.68.15

I tried this by hand for testing purposes:

Create chain

iptables -N WHITE_LIST

rue for chain

iptables -A WHITE_LIST -p tcp --dport 25 -s 207.144.68.15 -m state --state NEW -j ACCEPT

hook rule

iptables -A INPUT -j WHITE_LIST

I also tried this, but no luck

iptables -A INPUT -p tcp -s 207.44.168.15 -j LOG --log-prefix JOEY-TEST-JOEY

iptables -A INPUT -p tcp -s 207.44.168.15 --dport 25 -j DROP

iptables -N WHITE_LIST

iptables -A SMTP_TRAFFIC -j WHITE_LIST

iptables -N LOG_WHITE_LIST

iptables -A LOG_WHITE_LIST -j LOG --log-prefix "WHITELISTED"

iptables -A LOG_WHITE_LIST -j ACCEPT

I'm not real clear on this so I figured before I break something ask for help.

Thanks!

Joey