* Iptables -FTP
@ 2003-02-18 13:49 Paulo Andre
2003-02-18 15:40 ` Lot of MAC Address hare ram
0 siblings, 1 reply; 3+ messages in thread
From: Paulo Andre @ 2003-02-18 13:49 UTC (permalink / raw)
To: netfilter
Maybe someone could help. I have a problem that when someone FTP's into
a server behind the firewall they can do a dir listing or any data
requests. Port 20 and 21 are allowed...
Anyone have an idea
^ permalink raw reply [flat|nested] 3+ messages in thread
* Lot of MAC Address
2003-02-18 13:49 Iptables -FTP Paulo Andre
@ 2003-02-18 15:40 ` hare ram
2003-02-18 18:07 ` Joel Newkirk
0 siblings, 1 reply; 3+ messages in thread
From: hare ram @ 2003-02-18 15:40 UTC (permalink / raw)
To: netfilter
Hi all
In my LAN, i have lot of MAC address, ( pc's)
how do i make a rule for 100 MAC address (PC) to allow
and any other MAC address to Deny
any suggestions
thanks
hare
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Lot of MAC Address
2003-02-18 15:40 ` Lot of MAC Address hare ram
@ 2003-02-18 18:07 ` Joel Newkirk
0 siblings, 0 replies; 3+ messages in thread
From: Joel Newkirk @ 2003-02-18 18:07 UTC (permalink / raw)
To: hare ram, netfilter
On Tuesday 18 February 2003 10:40 am, hare ram wrote:
> Hi all
>
> In my LAN, i have lot of MAC address, ( pc's)
> how do i make a rule for 100 MAC address (PC) to allow
> and any other MAC address to Deny
>
> any suggestions
> thanks
> hare
You have to match each MAC individually, one at a time. If there is no
other acceptable filtering criteria (IP + incoming interface, for
example) then your best bet is something like this:
iptables -N MACtest
iptables -A MACtest -m mac --mac-source 00:11:22:33:44:55 -j RETURN
iptables -A MACtest -m mac --mac-source 00:11:22:33:44:66 -j RETURN
[... etc with all 100 MACs in individual rules, followed by ...]
iptables -A MACtest -j DROP
iptables -A FORWARD -m state --state ESTABLISHED,RELATED \
-j ACCEPT
iptables -A FORWARD -i eth0 -m state --state NEW -j MACtest
iptables -A FORWARD {ordinary rules from here on in FORWARD}
This will take any NEW traffic coming from eth0 to be forwarded and pass
ALL of it to the user-defined MACtest chain, which will RETURN
acceptable MACs back to FORWARD for continued processing, and DROP any
that don't match up with one of the rules. ( This way only the NEW
packets have to traverse potentially 101 extra rules before ordinary
matching in FORWARD continues.) You can call the same user-def chain
from INPUT as well, or instead.
Keep in mind that a script can build the MACtest chain in a loop, reading
the MAC addresses from a separate textfile and appending the DROP
'policy' after the loop completes.
j
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-18 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-18 13:49 Iptables -FTP Paulo Andre
2003-02-18 15:40 ` Lot of MAC Address hare ram
2003-02-18 18:07 ` Joel Newkirk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox