I am trying to build an Ubuntu server to act as a web content filter, using Squidguard and Dansguardian. There are great resources such as this:
https://help.nceas.ucsb.edu/ubuntu_network_configuration
I am following guides such as this one to create this web content filter server on Ubuntu Server 14.04.2:
In short, I have a virtual machine with 2 NICs, currently able to hit both the Internet through my firewall (on eth0), and then also able to hit internal Network (on eth1)s. Both NICs have static IP addresses. I am not understanding how to configure the bridge in /etc/network/interfaces. Or should I do bonding? I have installed bridge-utils already.
Here is my current, working, interfaces config that allows my server to ping external and internal and to the added routes:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.4
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.2
dns-search example.com domain.example.com
dns-nameservers 10.16.4.198 8.8.8.8
dns-search example.com
# The secondary network interface
auto eth1
iface eth1 inet static
address 10.16.3.4
netmask 255.255.255.0
network 10.16.3.0
broadcast 10.16.3.255
# Persistent routes
post-up route add -net 10.16.2.0/24 gw 10.16.3.252
post-up route add -net 10.16.4.0/24 gw 10.16.3.252
post-up route add -net 10.16.5.0/24 gw 10.16.3.252
My first attempt at a bridge failed to both get my test windows 7 workstation to hit the internet and I could not access its internal IP and/or eth1. Here it is:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.4
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.2
dns-search example.com domain.example.com
dns-nameservers 10.16.4.198 8.8.8.8
dns-search example.com
# The secondary network interface
auto eth1
iface eth1 inet static
address 10.16.3.4
netmask 255.255.255.0
network 10.16.3.0
broadcast 10.16.3.255
# Persistent routes
post-up route add -net 10.16.2.0/24 gw 10.16.3.252
post-up route add -net 10.16.4.0/24 gw 10.16.3.252
post-up route add -net 10.16.5.0/24 gw 10.16.3.252
# Bridge interface
auto br0
iface br0 inet manual
bridge_ports eth0 eth1
bridge_stp on
Any advice is appreciated.