Forums
New posts
Search forums
News
Security News
Technology News
Giveaways
Giveaways, Promotions and Contests
Discounts & Deals
Reviews
Users Reviews
Video Reviews
Support
Windows Malware Removal Help & Support
Inactive Support Threads
Mac Malware Removal Help & Support
Mobile Malware Removal Help & Support
Blog
Log in
Register
What's new
Search
Search titles only
By:
Search titles only
By:
Reply to thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Software
General Apps
VPN and DNS
How do I properly add routing metrics to my OpenVPN client config file?
Message
<blockquote data-quote="Studynxx" data-source="post: 1098284" data-attributes="member: 98674"><p>dev tun</p><p>tls-client</p><p></p><p>remote your-vpn-server.example.com 1194</p><p></p><p># The "float" tells OpenVPN to accept authenticated packets from any address,</p><p># not only the address which was specified in the --remote option.</p><p># This is useful when you are connecting to a peer which holds a dynamic address</p><p># such as a dial-in user or DHCP client.</p><p># (Please refer to the manual of OpenVPN for more information.)</p><p></p><p>#float</p><p></p><p># If redirect-gateway is enabled, the client will redirect its</p><p># default network gateway through the VPN.</p><p># It means the VPN connection will first connect to the VPN Server</p><p># and then to the internet.</p><p># (Please refer to the manual of OpenVPN for more information.)</p><p></p><p>#redirect-gateway def1</p><p></p><p># dhcp-option DNS: To set primary domain name server address.</p><p># Repeat this option to set secondary DNS server addresses.</p><p></p><p># Example of a specific route to a local resource</p><p>route 192.168.x.x 255.255.255.255 net_gateway 10</p><p></p><p>#dhcp-option DNS DNS_IP_ADDRESS</p><p></p><p>pull</p><p></p><p># If you want to connect by Server's IPv6 address, you should use</p><p># "proto udp6" in UDP mode or "proto tcp6-client" in TCP mode</p><p>proto udp</p><p></p><p>script-security 2</p><p></p><p>If I use just <strong>route 192.168.x.x 255.255.255.255 net_gateway</strong>, route print shows it working but the metric part is important for me to make it work the way I want it to.</p><p></p><p><strong>My objective:</strong> Have OpenVPN always on. When the client is on my home network, have OpenVPN do <em>nothing, no routing whatsoever.</em> When the client is <strong>not</strong> on my home network, have OpenVPN route traffic to my file server but do no other routing whatsoever.</p><p></p><p>Folks told me this is what routing metrics are for.</p></blockquote><p></p>
[QUOTE="Studynxx, post: 1098284, member: 98674"] dev tun tls-client remote your-vpn-server.example.com 1194 # The "float" tells OpenVPN to accept authenticated packets from any address, # not only the address which was specified in the --remote option. # This is useful when you are connecting to a peer which holds a dynamic address # such as a dial-in user or DHCP client. # (Please refer to the manual of OpenVPN for more information.) #float # If redirect-gateway is enabled, the client will redirect its # default network gateway through the VPN. # It means the VPN connection will first connect to the VPN Server # and then to the internet. # (Please refer to the manual of OpenVPN for more information.) #redirect-gateway def1 # dhcp-option DNS: To set primary domain name server address. # Repeat this option to set secondary DNS server addresses. # Example of a specific route to a local resource route 192.168.x.x 255.255.255.255 net_gateway 10 #dhcp-option DNS DNS_IP_ADDRESS pull # If you want to connect by Server's IPv6 address, you should use # "proto udp6" in UDP mode or "proto tcp6-client" in TCP mode proto udp script-security 2 If I use just [B]route 192.168.x.x 255.255.255.255 net_gateway[/B], route print shows it working but the metric part is important for me to make it work the way I want it to. [B]My objective:[/B] Have OpenVPN always on. When the client is on my home network, have OpenVPN do [I]nothing, no routing whatsoever.[/I] When the client is [B]not[/B] on my home network, have OpenVPN route traffic to my file server but do no other routing whatsoever. Folks told me this is what routing metrics are for. [/QUOTE]
Insert quotes…
Verification
Post reply
Top