Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to create a bridge in order to setup an openvpn server in an ubuntu box, which acts as a router for a local network on eth2, but without success.

This is my last conf, but every time I restart networking, the network loses the internet access.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
## This device provides internet access.
auto eth0
iface eth0 inet dhcp
    hwaddress ether C0:3F:0E:9E:07:E9
    mtu 1500

auto eth2
iface eth2 inet static
    name Internal
    address 192.168.1.3
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    mtu 1500

auto br0
iface br0 inet static
    address 192.168.1.6
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.3
    mtu 1500
    bridge_ports eth2
share|improve this question

2 Answers 2

up vote 1 down vote accepted

1.) If you're bridging then any IP addressing should go onto the br interface itself rather than on the member interface.

2.) As it stands you have overlapping IP addresses across multiple interfaces. See #1

3.) Setting yourself as your own default gateway won't get you very far and is, in fact, causing the loss of connectivity you mentioned.

If all you're trying to do is provide access to the network on eth2 you most likely don't need bridging at all. Make sure IP forwarding is enabled and that you're otherwise connected and it should be fine, as long as the return routes on the clients in that 192.168.1.x net are appropriately configured.

share|improve this answer

Isn't a bridge the wrong solution here? Don't you want the openvpn server accept connections from the internet (eth0), and the local lan is at eth2? The you just need iptables with NAT.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.