Pages

Wednesday, January 8, 2014

Ethernet Bridge For Synology DS412+

The Synology DS412+ comes with two Gigabit Ethernet plugs - but they aren't bridged, and additionally DSM 4.3 doesn't provide a simple option to enable this, so I had to set it up manually. WARNING: I'm not going to go into a lot of detail, so if you look at this and don't understand it, then you probably shouldn't be mucking around with this stuff in the first place.

ssh in and then (as they say on 4chan) "be root", then create a script file called make-bridge.sh that contains:

#!/bin/sh
insmod /lib/modules/stp.ko
insmod /lib/modules/bridge.ko
brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0
brctl addif br0 eth1
brctl show
ifconfig eth0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up
ifconfig br0 10.0.0.124 netmask 255.255.255.0 up
route add default gw 10.0.0.1 dev br0
echo "1" > /proc/sys/net/ipv4/ip_forward

"10.0.0.124" is the IP address of the Synology device; "10.0.0.1" is the IP address of your router and/or gateway.

Do a chmod 755 make-bridge.sh and then run the script. Or, if you're nervous, you can type the individual lines on the command line to make sure that each one executes properly. Once you're happy, you'll want to put the script in /usr/syno/etc.defaults/rc.d/ so that the bridge is re-built each time the Synology box reboots.

WARNING: if you screw things up, you may "lose contact" with your NAS and you may need to revert to using the Synology Assistant program to get back in touch.

No comments:

Post a Comment