Labels

Showing posts with label openWRT. Show all posts
Showing posts with label openWRT. Show all posts

Sunday, July 31, 2016

OpenWRT KVM Setup

I was able to eek out a little period of time this weekend to work on the Ubuntu server.  My concentration was on getting some vlans setup coming into the server from a trunk line.

But before that I attempted to setup some OpenWRT VMs using instructions from the openwrt website.  First, I downloaded https://downloads.openwrt.org/chaos_calmer/15.05/x86/64/openwrt-15.05-x86-64-combined-ext4.img.gz, then I moved it to the Ubuntu server and unpacked it.

gunzip openwrt-x86-generic-combined-ext4.img.gz
qemu-img convert -f raw -O vmdk openwrt-x86-generic-combined-ext4.img openwrt-x86-generic-combined-ext4.vmdk

Once that was done, I converted it to qcow2 using the script here.  Once that was accomplished I pulled the qcow2 file into KVM and cloned it three times.  The three clones are for additional router functions in the future.

Once I had the KVMs generated I then updated the ethernet connection going to the card that had the No-Mans Land vlan on it.  I added several more tagged vlans to the trunk that I had formed using the Netgear switch.  I then setup a number of vlans using the instructions from https://wiki.ubuntu.com/vlan.  I then updated the /etc/network/interfaces file to setup the new vlans from the trunk line (truncated):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo br0-vlan6 br2-vlan300 br1-vlan200 enp3s0 enp4s5 enp4s6
iface lo inet loopback

# The primary network interface
iface enp3s0 inet manual
iface br0-vlan6 inet static
    address 192.168.0.133
    netmask 255.255.255.0
    broadcast 192.168.0.255
    network 192.168.0.0
    gateway 192.168.0.2
    bridge_ports enp3s0
    bridge_stp off
    bridge_fd 0
    bridge_waitport 0
    dns-nameservers 8.8.8.8 8.8.4.4 192.168.1.1

iface enp4s5 inet manual

...


iface br2-vlan300 inet static
    address 10.100.30.50
    netmask 255.255.255.0
    broadcast 10.100.30.255
    network 10.100.30.0
    bridge_ports enp4s5
    bridge_stp off
    bridge_fd 0
    bridge_waitport 0

auto enp4s5.4
iface enp4s5.4 inet static
        address 10.10.4.45
        netmask 255.255.255.0
        vlan-raw-device enp4s5

(and so on ...)

Now that I have the vlans (tagged) setup on the same Ethernet as the No-Mans Land vlan, I can concentrate on setting up the OpenWRT VMs to point to the correct vlans.

Friday, May 29, 2015

Thinking of Setting Up an OpenVPN Server with 1-Port Capability for External Connections

I was thinking back to the 1-Port router idea and now I am thinking of adding an OpenVPN to the mix.  I could have an encryption key on both sides of the connection to give my setup a little extra protection.  So that would mean: (1) have an RPi running an OpenVPN server (allowing connection from the outside); (2) have a second RPi running an OpenVPN client/OpenWRT; and (3) let a connection go through the second RPi to my WorkNet Guest wireless to my home network.

I could have most of the ideas that I have come up with resident in this setup.  In addition, I would still like to have a selection switch that would give me some different options, like TOR, w/wo OpenVPN, etc.  The bubble chart would look like:


Thursday, July 26, 2012

Project #6 - Configure OpenWRT on a Router

My Buffalo router (running DD-WRT) is currently being used as a Wireless Access Port.  I would like to have this router changed over to OpenWRT and make it the incoming router for the home network.  In addition, since the router has a USB port, and I can add a USB drive, I would like to take advantage of the forked-daapd addin which would turn the router into an iTunes network audio server.