Re: Multiple Source Addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try something like this:

iptables -N allowable
#you should limit which traffic is sent through this chain
iptables -A input -j allowable
#list of IPs to allow
iptables -A allowable -s 192.168.43.1 -j ACCEPT
iptables -A allowable -s 192.168.43.2 -j ACCEPT
#It will only do this rule if it doesn't match any rules before it in the 
chain
iptables -A allowable -j LOG

I haven't tested this, but it should do the trick.

On Tuesday 15 April 2003 9:28 am, Keller Nicolas wrote:
> Hi!
>
> I want to log every packet that *doesn't* come from IP1 and IP2 (because
> these two hosts should be the only one that communicate with the
> Firewall). Up to now I couldn't figure out a way to do this, as it is
> NOT possible to include multiple source addresses in one line, like
> this:
>
> iptables -A INPUT -s !192.168.43.1 !192.168.43.2 -j LOG
>
> Anyone can show me a way to get this to work?
>
> Thank you very much!
>
> Nicolas Keller




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux