Networking Forums

Networking Forums > Computer Networking > Linux Networking > filter traffic between computers on the same subnet

Reply
Thread Tools Display Modes

filter traffic between computers on the same subnet

 
 
tremmarc
Guest
Posts: n/a

 
      10-16-2007, 05:02 PM
Lets say i have 1 network of 3 computers mixed os (winxp and linux)

Im wondering how to filter traffic between computer on the same subnet
using single firewall on linux

is that possible via iptables ?

Lets say subnet is 192.168.0.0 (dhcp server is running on linux)

Thanks!

 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      10-17-2007, 07:32 AM
On Oct 16, 10:02 am, tremmarc <tremm...@tiscali.it> wrote:
> Lets say i have 1 network of 3 computers mixed os (winxp and linux)
>
> Im wondering how to filter traffic between computer on the same subnet
> using single firewall on linux
>
> is that possible via iptables ?
>
> Lets say subnet is 192.168.0.0 (dhcp server is running on linux)
>
> Thanks!


I would use filtered bridging and ebtables.

DS

 
Reply With Quote
 
tremmarc
Guest
Posts: n/a

 
      10-17-2007, 01:18 PM
On Oct 17, 9:32 am, David Schwartz <dav...@webmaster.com> wrote:
> On Oct 16, 10:02 am, tremmarc <tremm...@tiscali.it> wrote:
>
> > Lets say i have 1 network of 3 computers mixed os (winxp and linux)

>
> > Im wondering how to filter traffic between computer on the same subnet
> > using single firewall on linux

>
> > is that possible via iptables ?

>
> > Lets say subnet is 192.168.0.0 (dhcp server is running on linux)

>
> > Thanks!

>
> I would use filtered bridging and ebtables.
>
> DS


thanks, is there a solution to use ebtables when have external switch?

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      10-17-2007, 06:33 PM
tremmarc wrote:
> On Oct 17, 9:32 am, David Schwartz <dav...@webmaster.com> wrote:
>
>>On Oct 16, 10:02 am, tremmarc <tremm...@tiscali.it> wrote:
>>
>>
>>>Lets say i have 1 network of 3 computers mixed os (winxp and linux)

>>
>>>Im wondering how to filter traffic between computer on the same subnet
>>>using single firewall on linux

>>
>>>is that possible via iptables ?

>>
>>>Lets say subnet is 192.168.0.0 (dhcp server is running on linux)

>>
>>>Thanks!

>>
>>I would use filtered bridging and ebtables.
>>
>>DS

>
>
> thanks, is there a solution to use ebtables when have external switch?


There is no way to limit the traffic between
two computers physically connected directly
together (or via a non-VLAN switch). You
have to physically force the only path for
the traffic to be through your filter.

The filtering with ebtables is only effective
if the other computers are connected to different
Ethernet ports of the filter computer, and the
Ethernet interface are configured into a
bridge.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      10-23-2007, 12:49 AM
On Oct 17, 6:18 am, tremmarc <tremm...@tiscali.it> wrote:

> thanks, is there a solution to use ebtables when have external switch?


It depends upon a lot of details you haven't given us. There are many
different ways to pull this off and some of them may apply to your
situation. Basically, you have to segment your network somehow so that
the only way for some computers to reach some other computers is
through your filtering box.

If your switch supports VLANs, for example, you can create a separate
VLAN for each port on your switch and configure each VLAN as a
separate bridging interface on the firewall. If there's only one
machine that's always the source or destination of the packets you
want to filter, you can connect that machine directly to your
filtering box and another network interface of that box to a switch
that you connect all the other machines too.

There are other ways. It depends.

DS


 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      10-23-2007, 09:08 AM
David Schwartz <(E-Mail Removed)> wrote:
> There are other ways. It depends.


I haven't tried this, but maybe you can do this:

Machine A is your filtering machine
Machine B and C are Windows boxes

Your subnet Mask is 255.255.255.0

B has IP address 10.0.2.2 default gateway 10.0.2.1
C has IP address 10.0.3.2 default gateway 10.0.3.1

A is configured with three IP addresses against its single interface card:
10.0.0.1, 10.0.2.1 and 10.0.3.1

B and C are on separate network addresses, and the only way to communicate
with each other is via the filtering gateway.

I haven't tried any of this stuff, and I don't know off the top of my head
what changes would need to be made to the gateway machine, but I am sure that
you can assign more than one IP address to a network interface card, so I
think you are half way to a solution.

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing - Computers on either subnet have problems finding PCs on the other subnet ZZYZX Windows Networking 2 03-26-2011 01:01 AM
Incoming traffic filter Harley Network Routers 13 04-23-2010 01:29 PM
Computers on same subnet not talking Rick Perryman Network Routers 0 04-27-2006 03:08 PM
Cannot ping two computers on same subnet =?Utf-8?B?TVNN?= Broadband Hardware 5 12-20-2005 04:08 AM
I need to setup two computers with the same ip in the same subnet zido Linux Networking 9 07-11-2003 06:25 AM



1 2 3 4 5 6 7 8 9 10 11