- Destination LAN NET Subnet Mask Gateway Interface
172.27.35.1 255.255.255.255 0.0.0.0 WAN
192.168.10.0 255.255.255.252 192.168.1.150 LAN & WLAN
192.168.1.0 255.255.255.0 0.0.0.0 LAN & WLAN
172.27.35.0 255.255.255.0 0.0.0.0 WAN
169.254.0.0 255.255.0.0 0.0.0.0 LAN & WLAN
0.0.0.0 0.0.0.0 172.27.35.1 WAN
client1.ovpn
Code: Select all
### CLIENT1 CONFIG FILE ###
# lines starting with # or ; will not be read by OpenVPN
client
dev tap
#dev-node MyTAP # If you renamed your TAP interface or have more than one TAP interface then remove the # at the beginning and change "MyTAP" to its name.
proto udp
remote XXX.dyndns-free.com XXX #### CHANGE. Replace with DynDNS or IP address. Number after is the port you will have to forward with your router.
route 192.168.1.0 255.255.255.0 vpn_gateway 3 #### CHECK. This it the IP address scheme and subnet of the normal network your server is on.
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\client1.crt" #### CHECK. Must match client name.
key "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\client1.key" #### CHECK. Must match client name.
tls-auth ta.key 1 # 'ta.key' must be in the config folder.
ns-cert-type server
cipher AES-128-CBC # AES encrytion for the connection.
comp-lzo
verb 2 # This sets how detailed the log file will be. 0 causes problems and higher numbers can give you more detail for troubleshooting.
Code: Select all
### SERVER CONFIG FILE ###
# lines starting with # or ; will not be read by OpenVPN
local 192.168.1.150 #### CHANGE. This is the IP address of the real (not tun/tap) network interface of the server. Find it using 'run > cmd > ipconfig'.
port XXX #### CHANGE. This is the port the service will listen on. See 'Configure your Router' section for recommendation.
proto udp
mssfix 1400
push "dhcp-option DNS 192.168.1.1" #### CHANGE. Replace the Xs with the IP address of the DNS for your home network (usually your ISP's DNS).
#push "dhcp-option DNS X.X.X.X" #### CHANGE (OPTIONAL). A second DNS server. If you have one, remove the #.
dev tap
#dev-node MyTAP #### CHECK. If you renamed your TAP interface or have more than one TAP interface, remove the # and change "MyTAP" to its name.
ca "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\server.key" # Never take this file off the server.
dh "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\dh2048.pem"
tls-auth ta.key 0 # 'ta.key' must be in the config folder.
server 192.168.10.0 255.255.255.128 #### CHECK. Assigns the virtual IP address and subent to the VPN. Make sure you add this to your Router (section 4i).
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1" # This will force the clients to use the home network's internet connection
keepalive 10 120
cipher AES-128-CBC # Connection will be encrypted with AES 128-bit.
comp-lzo
max-clients 10 #### CHECK. Assigns the maximum number of clients here, change according to your setup.
persist-key
persist-tun
status openvpn-status.log
verb 2 # This sets how detailed the log file will be. 0 causes problems and higher numbers can give you more detail for troubleshooting.