Help Creating a Configuration File

How to customize and extend your OpenVPN installation.
Post Reply
D41337
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 03, 2012 7:24 am

Help Creating a Configuration File

Post by D41337 » Tue Jan 03, 2012 7:29 am

I need to make a configuration file that routes all trafic going to IP XXX.XXX.XXX.XXX over the VPN connection with this info:

Code: Select all

declare root
{
	bool CheckServerCert false
	bool StartupAccount false

	declare ClientAuth
	{
		uint AuthType 0
		string Username guest
	}
	declare ClientOption
	{
		string AccountName MobileFree.jp
		uint AdditionalConnectionInterval 1
		uint ConnectionDisconnectSpan 30
		string DeviceName DHCP
		bool DisableQoS false
		bool HalfConnection true
		bool HideStatusWindow false
		string Hostname vpn.mobilefree.jp
		string HubName GUEST
		uint MaxConnection 6
		bool NoRoutingTracking false
		uint NumRetry 4294967295
		uint Port 443
		uint PortUDP 0
		string ProxyName $
		byte ProxyPassword $
		uint ProxyPort 0
		uint ProxyType 0
		string ProxyUsername $
		bool RequireBridgeRoutingMode false
		bool RequireMonitorMode false
		uint RetryInterval 15
		bool UseCompress false
		bool UseEncrypt true
	}
}
I understand that all this info probably isn't necessary, I just need the basics. I've also looked at the config examples but am still confused as hell as to how to actually do this. I am unable to find a sample config that actually does something I would deem useful to go off, and the conf generator is Linux only (I am on a windows platform). So, I was wondering if anyone could do this for me or help me get started.

D41337
OpenVpn Newbie
Posts: 2
Joined: Tue Jan 03, 2012 7:24 am

Re: Help Creating a Configuration File

Post by D41337 » Tue Jan 03, 2012 7:51 am

So far I've got this...
it doesn't seem to be very useful for much

Code: Select all

client
dev tun
proto tcp
remote vpn.mobilefree.jp 443
resolv-retry infinite
nobind

;persist-key
;persist-tun
;ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
;cert "C:\\Program Files\\OpenVPN\\config\\mhf-client.crt"
;key "C:\\Program Files\\OpenVPN\\config\\mhf-client.key"

ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
;comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20

;auth-user-name guest
redirect-gateway def1 bypass-dhcp

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

Re: Help Creating a Configuration File

Post by Mimiko » Sat Jan 07, 2012 5:48 pm

From the manuals create the tunnel. Using iptablesyou can route only packets for that IP thru tunnel. As you are on windows, the route command only will not help. You will have to search a routing software.

fiona7
OpenVpn Newbie
Posts: 2
Joined: Fri Jan 20, 2012 8:55 pm

Re: Help Creating a Configuration File

Post by fiona7 » Fri Jan 20, 2012 8:58 pm

Thank you Mimiko. Was wondering the same thing. :shock:

Post Reply