My intent is to get it set up so that all the client’s traffic is routed through the VPN. I also would like to configure it so that it can connect to other computers on the router’s LAN, on the 10.2.1.0 network.
Here is the server configuration. The formatting is a little different for OpenWRT, but it should be obvious what each line does:
Server Configuration:
Code: Select all
config 'openvpn' 'lan1'
option 'enable' '1'
option 'port' '1194'
option 'proto' 'udp'
option 'dev' 'tun'
option 'client_to_client' '1'
option 'keepalive' '10 120'
option 'cipher' 'AES-256-CBC'
option 'comp_lzo' '1'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'verb' '3'
option 'ifconfig_pool_persist' '/tmp/ipp_tun.txt'
option 'log' '/tmp/openvpn_tun_status.log'
option 'ca' '/etc/openvpn/ca.crt'
option 'cert' '/etc/openvpn/server.crt'
option 'key' '/etc/openvpn/server.key'
option 'dh' '/etc/openvpn/dh2048.pem'
option 'server' '10.2.3.0 255.255.255.0'
option 'push' 'route 10.2.3.0 255.255.255.0'
list 'push' 'redirect-gateway def1'
list 'push' 'dhcp-option DNS 10.2.3.1'
Code: Select all
client
dev tun
proto udp
remote <myserverIP> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
cipher AES-256-CBC
comp-lzo
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>