DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-07-17 05:08:58

neonpolaris
Member
Registered: 2009-06-19
Posts: 20

Bridging with brctl for OpenVPN

I used to use OpenVPN on my DD-wrt router, but I'm trying to move it over to my DNS-323.

I've installed OpenVPN thanks to the package here:
http://dns323.kood.org/forum/viewtopic.php?id=3444

I've set up the certificates, and I can connect completely, but nothing happens from here.

I want to use a bridged connection, but I have no brctl to use.  How would I go about getting this?  Do I need to compile it?  Is it in a package that's already available?

Here's the config that I'm using, almost exactly as it was on my old router:

Server config:

Code:

# Tunnel options
mode server       # Set OpenVPN major mode
proto udp         # Setup the protocol (server)
port 1194         # TCP/UDP port number
dev tap0          # TUN/TAP virtual network device
keepalive 15 60   # Simplify the expression of --ping 
daemon            # Become a daemon after all initialization
verb 3            # Set output verbosity to n 
comp-lzo          # Use fast LZO compression 

# OpenVPN server mode options
client-to-client  # tells OpenVPN to internally route client-to-client traffic 
duplicate-cn      # Allow multiple clients with the same common name

# TLS Mode Options
tls-server        # Enable TLS and assume server role during TLS handshake 
ca /ffp/etc/openvpn/certs/ca.crt         # Certificate authority (CA) file
dh /ffp/etc/openvpn/certs/dh1024.pem     # File containing Diffie Hellman parameters 
cert /ffp/etc/openvpn/certs/server.crt   # Local peers signed certificate
key /ffp/etc/openvpn/certs/server.key    # Local peers private key

Client:

Code:

client
dev tap
proto udp
remote <my-ip-here> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3

I *think* I need to add the following lines after tun.ko is loaded in OpenVPN.sh

Code:

openvpn --mktun --dev tap0
brctl addif br0 tap0
ifconfig tap0 0.0.0.0 promisc up

But like I said, no brctl.  Can anyone point me in the right direction?

Offline

 

#2 2009-07-18 22:02:10

neonpolaris
Member
Registered: 2009-06-19
Posts: 20

Re: Bridging with brctl for OpenVPN

So it seems that brctl is included in busybox.  But not the busybox I've got installed. (current one)

According to this post, it was included in an older version:
http://dns323.kood.org/forum/viewtopic. … 485#p21485

But I've copied the busybox out out fun_plug versions 0.4, 0.3, 0.2, and 0.1, and none of them include the brctl.  (checked by running the busybox file and looking for brctl in the list)

I'm at a loss.  I suppose I'll try and learn how to compile my own.

Last edited by neonpolaris (2009-07-21 23:23:12)

Offline

 

#3 2009-07-19 00:33:53

neonpolaris
Member
Registered: 2009-06-19
Posts: 20

Re: Bridging with brctl for OpenVPN

Thanks to the optware ipkg "bridge-utils" I now have brctl.  Unfortunately, i get "add bridge failed: Package not installed"

After some searching I see that bridge capability must be in the kernel, else I need a module.  So, I've made progress, but I still need to learn how to compile this module.

Offline

 

#4 2009-08-08 15:52:41

alny
Member
Registered: 2009-08-05
Posts: 5

Re: Bridging with brctl for OpenVPN

neonpolaris wrote:

I want to use a bridged connection, but I have no brctl to use.  How would I go about getting this?  Do I need to compile it?  Is it in a package that's already available?

Why do you  use tap0 device instead of tun0? Open VPN FAQ recommend to use IP packet tunnel (tun) instead of ethernet  tunnel (tap). If you will switch to tun, everything will works fine, but see my post at this topic to correct routing configuration at the other computers in your network.

Last edited by alny (2009-08-08 19:48:46)

Offline

 

#5 2009-09-04 12:50:13

mikenight
New member
Registered: 2009-09-04
Posts: 1

Re: Bridging with brctl for OpenVPN

I have the same problem, i need a layer 2 tunnel with bridging.

I cross compiled the required kernel modules (for kernel 2.6.12.6-arm1).

insmod i2c-core.ko and  sd_mod.ko works but insmod bridge.ko will report errors:

insmod: cannot insert 'bridge.ko': unknown symbol in module

dmesg ouput is

bridge: Unknown symbol br_handle_frame_hook
bridge: Unknown symbol br_fdb_put_hook
bridge: Unknown symbol br_fdb_get_hook

Anyone knows what could be the problem?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB