Results 1 to 1 of 1
Hi all,
To start with - I want to bridge tap0 interface (which is created by openvpn server), with eth0 (which is my lan interface).
I've compiled bridge-utils, loaded bridge.ko ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-27-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
[SOLVED] bridging tap0 and eth0 to br0
Hi all,
To start with - I want to bridge tap0 interface (which is created by openvpn server), with eth0 (which is my lan interface).
I've compiled bridge-utils, loaded bridge.ko and tun.ko modules with no errors.
Then I want to run a simple .sh that worked perfectly for me on my VirtualBox Ubuntu,
On my NAS box this scripts goes to:Code:#!/bin/bash ################################# # Set up Ethernet bridge on Linux # Requires: bridge-utils ################################# # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap0" # Define physical ethernet interface to be bridged # with TAP interface(s) above. eth="eth0" eth_ip="172.16.1.3" eth_netmask="255.255.255.0" eth_broadcast="172.16.1.255" for t in $tap; do openvpn --mktun --dev $t done brctl addbr $br brctl addif $br $eth for t in $tap; do brctl addif $br $t done for t in $tap; do ifconfig $t 0.0.0.0 promisc up done ifconfig $eth 0.0.0.0 promisc up ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast
and I'm losing connection to my box.Code:ifconfig $eth 0.0.0.0 promisc up
I've added echo to script, and the last one is seen beforeAlso did dmesg to a file (since this is nas box - the only way to see console - remote ssh)Code:ifconfig $eth 0.0.0.0 promisc up
Looks like everything is okay in dmesg.Code:br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature. * * * * * * * * * * device eth0 entered promiscuous mode * * * * * * * * * * * * * * * * * * * * * * device tap0 entered promiscuous mode * * * * * * * * * * * * * * * * * * * * * * br0: port 2(tap0) entering learning state * * * * * * * * * * * * * * * * * * * br0: port 1(eth0) entering learning state * * * * * * * * * * * * * * * * * * * device br0 entered promiscuous mode * * * * * * * * * * * * * * * * * * * * * * br0: topology change detected, propagating * * * * * * * * * * * * * * * * * * * br0: port 2(tap0) entering forwarding state * * * * * * * * * * * * * * * * * * br0: topology change detected, propagating * * * * * * * * * * * * * * * * * * * br0: port 1(eth0) entering forwarding state
ifconfig br0 shows 172.16.1.3 with netmask 255.255.255.0
Before script execution I did:
and also (but there were no rules there):Code:echo 1 > /proc/sys/net/ipv4/ip_forward
I've tried adding rules for br0 and tap0.. no successCode:iptables -F
What I am doing wrong?
Sitting with this problem for several weeks already.
Thanks!



