On my home network (10.0.1.0/24) I have my Macs and iOS devices (the others don't matter). LAN clients gain IPv4 and IPv6 (native) access via an Airport Extreme (AEBS) connected to a cable modem on Comcast (I have no better choice). I require a VPN to access some $work resources and it'd be convenient if the VPN "just worked" on whichever screen I have at hand. To avoid managing a VPN client on each device, I run OpenVPN on my server (10.0.1.252).
Upon connection to the VPN, the server gets the typical static routes added and I've enabled forwarding and NAT so traffic from $private_lan -> <vpn_netblocks>
is properly NAT routed down the VPN tunnel (tun0). My DNS recursor runs on that server and knows to forward certain DNS requests to the internal DNS servers. It all works.
The last bit is to make the LAN clients aware of the VPN. Their default route is the AEBS (10.0.1.1). This is ideal because the AEBS & cable modem have their own battery so the network stays up many hours after the power goes out. For LAN clients to gain VPN access, they need to learn of the more specific routes available on the server. On Mac OS, manually adding static routes like this works:
route add 10.7.0.0/16 10.0.1.252
The question is how to automatically inform the Mac and iOS devices those routes are available. I cannot add static routes to the AEBS (I'd be delighted to be proven wrong!). Changing the default IPv4 route to point at the server is my last resort.
I tried adding the routes to dhcpd.conf as static routes (dhcp option code 121), as documented in RFC 3442. Here are the relevant portions of my dhcpd.conf:
# options for static routes
option rfc3442-classless-static-routes code 121 = array of integer 8;
option ms-classless-static-routes code 249 = array of integer 8;
subnet 10.0.1.0 netmask 255.255.255.0 {
option rfc3442-classless-static-routes 16, 10,7, 10,0,1,252;
option ms-classless-static-routes 16, 10,7, 10,0,1,252;
# needed b/c this overrides option routers
option rfc3442-classless-static-routes 0, 10,0,1,1;
option ms-classless-static-routes 0, 10,0,1,1;
}
The options are being served by dhcpd but they are ignored by Mac OS X. Is there:
- Some other DHCP option that does work?
- If I set up OSPF or RIP will it "just work" for both Mac and iOS devices?
- Something like Neighbor Discovery Protocol for IPv4?
Pointers to documentation that is known to work is greatly appreciated.
Update
- Added dhcpd.conf showing my config
- Added link to Apple Discussion citing no support for RFC 3442