Goods and services provided by JVDS. Sold and Processed by 2checkout
Setting up an ethernet bridge with your JVDS virtual server can be easy. With a few simple utilities and a couple modules added to your kernel by the JVDS support crew, you can have your virtual server show up as a local machine on your LAN. This is great for file management as utilities like Samba and Microsoft Networking were made to work on a broadcast based network and nothing more complex.
I used two utilities to get my Ethernet bridge working with my JVDS virtual server. The first is OpenVPN, available at http://openvpn.sourceforge.net. The other is the bridge-utils package, available at http://bridge.sourceforge.net. bridge-utils comes with some distributions, so you might already have it installed.
Install both packages as per the instructions on the site. After they have been successfuly installed, read through the Ethernet Bridging Mini-HOWTO on the OpenVPN site to get familiarized with the process.
The JVDS server is similar, but not identical, to the example given in the Mini-HOWTO. On your JVDS end, you will notice that you have only one network interface, typically eth0. In this Mini Mini-HOWTO I will refer to your Internet device, the device with your public JVDS IP address, as eth0.
OpenVPN requires two extra kernel options: The TUN/TAP device (tun.o) and Ethernet Bridging (bridge.o). Your kernel must have these loaded before you can continue.
To bridge, you must have a "slave interface", typically eth1 on a home or office linux router. Given that you don't have one on your JVDS server, all you need to do is use the dummy0 network adapter as a fake LAN NIC.
Below is the script I use with comments. This completes my left side of the Ethernet bridge. The right side is identical to the official OpenVPN example. With these two together, I can arp for everything on my lan at both ends! 3000 miles apart, not bad for the local LAN!
##############################################################
#first, give dummy0, your virtual NIC, a MAC address. #it doesnt have one by default, and you will need one #to be able to talk Ethernet to the other devices. ifconfig dummy0 hw ether de:ad:be:ef:00:00 #use openvpn to initliaze the tap0 ethernet tap device openvpn --mktun --dev tap0 #use the bride-utils brctl command to initialize your br0 bridge brctl addbr br0 #bind your openvpn ethernet tap to your bridge brctl addif br0 tap0 #bind your fake NIC to your bridge brctl addif br0 dummy0 #bring your openvpn ethernet tap up in promisc. mode to "hear" #note I am assigning 0.0.0.0 as the IP for both of these next two #commands. this is important! if you assign the same IP to your #devices below as the bridge, your bridge endpoints cannot talk #to each other! everything else works, though. I got caught on #this for a while by carelessly removing the null IP assignment! ifconfig tap0 0.0.0.0 promisc up #bring your virtual NIC up so it too can "hear" ifconfig dummy0 0.0.0.0 promisc up #bring your bridge up with your "LAN" IP. this obviously #is the same subnet info as you have on your local LAN ifconfig br0 10.0.1.250 netmask 255.255.254.0 broadcast 10.0.1.255 #now just fire openVPN up to get your end talking to the other openvpn --dev tap0 --secret /etc/openvpn/static.key --verb 9 --remote linux.otherend.com --tun-mtu 1500 --tun-mtu-extra 64 --ping 40 #on your local end, fire it up in a similar manner and you should #be able to arp across the internet to your JVDS server's virtual #LAN IP!
################################################################