2

I have a typical semi advanced home network scenario:

A cable modem - eth
A wireless router (netgear n600) eth and wlan
A home server (Running ubuntu 12.04 LTS, connected over wlan)
A bunch of wireless clients (wlan)

Lying around I have anoher cheaper wlan router, and two different USB wlan NIC's that are known to work with Linux.

ACTA struck. I want to route ALL of my WAN traffic through a remote server through a VPN.

For sake of completition, lets say there is a remote server running debian sqeeze where a VPN server is to be installed. The network is then to behave so that if the VPN is not operative, it is separated from the outside world. I am familiar with general system/network practices, but lack the specific detailed knowledge to accomplish this.

Please suggest the right approach, packages and configurations you'd use to reach said solution. I've also envisioned the following network configuration, please improve it if you see fit:

==LAN==

Client
ip:10.1.1.x
nm:255.0.0.0
gw:10.1.1.1 reached via WLAN

Wlan router 1:
ip: 10.1.1.1
nm:255.0.0.0
gw: 10.10.10.1 reached via ETH

Homeserver:  <<< VPN is initiated here, and the other endpoint is somewhere on the internet.
eth0:
ip:10.10.10.1
nm: 0.0.0.0
gw:192.168.0.1 reached via WLAN

Homeserver:
wlan0:
ip: 192.168.0.2
nm: 255.255.255.0
gw: 192.168.0.1 reached via WLAN

==WAN==

Wlan router 2:
ip: 192.168.0.1
nm: 0.0.0.0
gw: set via dhcp
uplink connector: cable modem


Cable Modem:
Remote DHCP.
Has on-board DHCP server for ethernet device that connects to it,
and only works this way.

All this WLAN fussery is because my home server is located in a part of the house where a cable link isnt possible unfortunately.

2 Answers 2

1

Remove the gateway entry from wlan0. You only want the local address network on that interface and the VPN server to have routes. When you bring up your VPN interface, set the default gateway on that.

2
  • Could you give an example of what you mean with the last sentence?
    – duck degen
    Apr 2, 2012 at 23:09
  • When you bring your VPN link online, it should provide you with a new interface to manage. route add default gw vpn.internal.server.ip dev vpn0 Apr 2, 2012 at 23:15
1

What version of the N600 do you have? based on the OpenWRT Wiki a couple of versions of this route appear to be supported. the v3 is a Broadcom based setup so the kids at DD-WRT (and by extension Tomato/USB) might even have support for it, a bit of googling shows hits, but it will be completely dependent on what version you have exactly.

You might find it less of a hassle to pick up a router that supports DD-WRT (or its derivatives) native and flash a firmware that has VPN Client Support. I'd recommend the ASUS RT-N16 personally and this should accomplish what you set out to do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .