0

I´d like to tool around a little bit with a network using a router which is connected to a modem and a Intrusion Protection System (FreeBSD) in between the router and the other computers/servers. Without the use of wlan.

How do I set this up?

My router has the following settings

IP 192.168.1.2
wlan=OFF
DHCP=ON
DHCP starts at 192.168.1.10
Internet=ON

IPS (freeBSD) /etc/rc.conf where vr0 is my network card

ifconfig_vr0="inet 192.168.1.2 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
Three network cards: vr0, r10 and r11
Internet=ON

Another FreeBSD system. Let's call it ping101. I connected ping101 to r10 or r11 of my IPS not to the router with the following settings in the /etc/rc.conf

ifconfig_em0="inet 192.168.1.3 netmask 255.255.255.0"
defaultrouter="192.168.1.2" (to my IPS)


With this setup I can't seem to ping my ping101 or ping the IPS/router with ping101. What am I doing wrong?

3
  • So in your IPS you only have a single NIC? How are you routing traffic then?
    – mtak
    Dec 11, 2014 at 13:55
  • In my IPS I have 3 NIC's: vr0, r10 and r11. Traffic should go from computers -> IPS -> router -> Modem. The IPS is set up to use vr0 as gateway (from IPS to router). All other computers should connect to the IPS using r10 or r11.
    – empec
    Dec 11, 2014 at 13:58
  • I read now that my IPS should be configured as "bridge".
    – empec
    Dec 11, 2014 at 14:21

1 Answer 1

0

The solution is to create a bridge in the IPS in this screnario.

I connected to the IPS and created a bridge

# ifconfig bridge create
bridge0

As shown above bridge0 was created. Now connect the NIC's together. In my example vr0 is the NIC to the router and rl0 and rl1 are the one being connected to the Personal Computer's.

# ifconfig bridge0 addm rl0 up
ifconfig: BRDGADD rl0: File exists
# ifconfig bridge0 addm vr0 up
ifconfig: BRDGADD vr0: File exists
# ifconfig rl0 up
# ifconfig vr0 up

Check if both the rl0 and rl1 have been added to the interface: bridge0.

# ifconfig bridge0

    member: rl0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 2 priority 128 path cost 200000
    member: vr0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 1 priority 128 path cost 200000

Now Personal Computers can connect to the IPS (192.168.1.2). A FreeBSD server for example can add to its /etc/rc.conf:

defaultrouter="192.168.1.2"


Documentation for bridging in FreeBSD can be found here on the official webpage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .