Skip to contentSkip to conversation

help with whitelist

DISCUSSION Joey 2 participants 4 messages Feb 9, 2009 – Feb 10, 2009

lore
Share & tools
lore

Joey

author
#0 lore raw

Hello All,

Im having a problem with a whitelist I am trying to implement and apparently we still block IP's on the whitelist.

First I execute the whitelist like so:

:CIDR-WHITE-LIST - [0:0]

:LOG_WHITE-LIST - [0:0]

-A CIDR-WHITE-LIST -s 1.2.3.4 -j LOG_WHITE-LIST

-A LOG_WHITE-LIST -j LOG --log-prefix "CIDR-WHITE-LIST"

-A LOG_WHITE-LIST -j ACCEPT

-A SMTP_TRAFFIC -j CIDR-WHITE-LIST

Then the blacklist like so:

:CIDR-ASIAN - [0:0]

:LOG_ASIAN - [0:0]

:SMTP_TRAFFIC - [0:0]

-A INPUT -p tcp -m tcp --dport 25 -m state --state NEW -j SMTP_TRAFFIC

-A CIDR-ASIAN -s 2.3.4.5 -j LOG_ASIAN

-A LOG_ASIAN -j LOG --log-prefix "SPAM-BLOCK-CIDR-ASIAN"

-A SMTP_TRAFFIC -j CIDR-ASIAN

I am basically blocking port 25 traffic to blocked IP's.

I must be missing something stupid, but cant see it.

Any help is greatly appreciated!

Thanks!

#1 lore raw

Hi,

Am I blind or there is no DROP/REJECT target at all???

Swifty

Joey írta:

Quoted 64 lines

Hello All,

Im having a problem with a whitelist I am trying to implement and apparently we still block IP's on the whitelist.

First I execute the whitelist like so:

:CIDR-WHITE-LIST - [0:0]

:LOG_WHITE-LIST - [0:0]

(quoted diff) +0 -4
-A CIDR-WHITE-LIST -s 1.2.3.4 -j LOG_WHITE-LIST 
 
-A LOG_WHITE-LIST -j LOG --log-prefix "CIDR-WHITE-LIST" 
 
-A LOG_WHITE-LIST -j ACCEPT 
 
-A SMTP_TRAFFIC -j CIDR-WHITE-LIST

Then the blacklist like so:

:CIDR-ASIAN - [0:0]

:LOG_ASIAN - [0:0]

:SMTP_TRAFFIC - [0:0]

(quoted diff) +0 -4
-A INPUT -p tcp -m tcp --dport 25 -m state --state NEW -j SMTP_TRAFFIC
 
-A CIDR-ASIAN -s 2.3.4.5 -j LOG_ASIAN 
 
-A LOG_ASIAN -j LOG --log-prefix "SPAM-BLOCK-CIDR-ASIAN" 
 
-A SMTP_TRAFFIC -j CIDR-ASIAN

I am basically blocking port 25 traffic to blocked IP's.

I must be missing something stupid, but cant see it.

Any help is greatly appreciated!

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw

Sorry I forgot the

-A LOG_ASIAN -j DROP

Any idea on why the accept isn’t working?

Quoted 7 lines

-----Original Message-----
From: Gáspár Lajos [mailto:[email protected]]
Sent: Tuesday, February 10, 2009 9:50 AM
To: Joey
Cc: IPTables
Subject: Re: help with whitelist

Quoted 12 lines

Hi,

Am I blind or there is no DROP/REJECT target at all???

Swifty

Joey írta:

Quoted 5 lines

Hello All,

Im having a problem with a whitelist I am trying to implement and

apparently

Quoted 59 lines
Quoted 59 lines

we still block IP's on the whitelist.

First I execute the whitelist like so:

:CIDR-WHITE-LIST - [0:0]

:LOG_WHITE-LIST - [0:0]

(quoted diff) +0 -4
-A CIDR-WHITE-LIST -s 1.2.3.4 -j LOG_WHITE-LIST
 
-A LOG_WHITE-LIST -j LOG --log-prefix "CIDR-WHITE-LIST"
 
-A LOG_WHITE-LIST -j ACCEPT
 
-A SMTP_TRAFFIC -j CIDR-WHITE-LIST

Then the blacklist like so:

:CIDR-ASIAN - [0:0]

:LOG_ASIAN - [0:0]

:SMTP_TRAFFIC - [0:0]

(quoted diff) +0 -4
-A INPUT -p tcp -m tcp --dport 25 -m state --state NEW -j SMTP_TRAFFIC
 
-A CIDR-ASIAN -s 2.3.4.5 -j LOG_ASIAN
 
-A LOG_ASIAN -j LOG --log-prefix "SPAM-BLOCK-CIDR-ASIAN"
 
-A SMTP_TRAFFIC -j CIDR-ASIAN

I am basically blocking port 25 traffic to blocked IP's.

I must be missing something stupid, but cant see it.

Any help is greatly appreciated!

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Hi,

Okay...
Try again... :D

:LOGDROP_ASIAN - [0:0]

-A LOGDROP_ASIAN -j LOG --log-prefix "SPAM-BLOCK-CIDR-ASIAN"

-A LOGDROP_ASIAN -j DROP

:SMTP_TRAFFIC - [0:0]

-A SMTP_TRAFFIC -s 2.3.4.5 -j LOGDROP_ASIAN

-A INPUT -p tcp -m tcp --dport 25 -m state --state NEW -j SMTP_TRAFFIC

You can check the state (matching packets) with this command:

iptables -vnL

Swifty