All of lore.kernel.org
 help / color / mirror / Atom feed
* Beginner Question on restricting traffic within the same subnet.
@ 2009-11-02 15:21 paddy joesoap
  2009-11-02 15:51 ` Pascal Hambourg
  0 siblings, 1 reply; 7+ messages in thread
From: paddy joesoap @ 2009-11-02 15:21 UTC (permalink / raw)
  To: netfilter

Hi there,

Normally I think of firewalls as controlling packet flows that pass
through it (for example:Internet to Intranet).

Can netfilter also control traffic on the same subnet? Is this a
typical thing to do, or is it more normal to deploy local hosted
firewalls also on machines?

Suppose I had the following set up:
Internal Machines 1,2 and 3 are on the same subnet governed by the
netfilter firewall.

                                           ---------- Machine1
Internet ------ Netfilter Firewall ---------- Machine2
                                           ---------- Machine3

Suppose I don't want Machine1 communicating with Machine3. Assume eth0
is internal Netfilter interface. All machines are in the same subnet.
The Netfiler Firewall can be considered to also have typical linux box
with router capabilities.

Is it normal to have the firewall restrict this kind of local subnet
access even though it does not technically leave the network?

Would the rules be as follows:

iptables -A FORWRD -i eth0 -s Machine1IP -d Machine3IP -j DROP
iptables -A FORWRD -o eth0 -s Machine1IP -d Machine3IP -j DROP
iptables -A FORWRD -i eth0 -s Machine3IP -d Machine1IP -j DROP /*
redundant to previous rules? */
iptables -A FORWRD -o eth0 -s Machine3IP -d Machine1IP -j DROP /*
redundant to previous rules? */
iptables -A FORWRD -i eth0 -s anyIP -d anyIP -j ACCEPT /* allow
Machine1 talk to Machine2 and vice versa. Allow Machine3 talk to
Machine2 and vice versa.*/
iptables -A FORWRD -o eth0 -s anyIP -d any3IP -j ACCEPT /* allow
Machine1 talk to Machine2 and vice versa. Allow Machine3 talk to
Machine2 and vice versa.*/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-02 22:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 15:21 Beginner Question on restricting traffic within the same subnet paddy joesoap
2009-11-02 15:51 ` Pascal Hambourg
2009-11-02 17:02   ` paddy joesoap
2009-11-02 21:25     ` Pascal Hambourg
2009-11-02 21:58       ` paddy joesoap
2009-11-02 22:23         ` Pascal Hambourg
2009-11-02 22:38           ` paddy joesoap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.