I can connect to an OpenVPN server from Windows without any problems.
But when I try to connect from Ubuntu 12.04 (start OpenVPN) I receive the following:
OpenVPN needs a gateway parameter for a –route option and no default was specified by either –route-gateway or –ifconfig options
SERVER IP: 161.53.X.X internal network: 10.0.0.0 / 8
What I need to do ?
client configuration:
client
dev tap
proto udp
remote 161.53.X.X 1194
resolv-retry infinite
nobind
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3
server conf:
local 161.53.X.X
port 1194
proto udp
dev tap
dev-node OpenVPN
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
# DHCP leases addresses to clients
server-bridge
# Push routes to the client to allow it
# to reach other private subnets behind
# the server. Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
push "route 10.0.0.1 255.255.0.0"
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
verb 6
log from Ubuntu client:
[Server] Peer Connection Initiated with [AF_INET]161.53.XX.XX:1194
SENT CONTROL [Server]: 'PUSH_REQUEST' (status=1)
PUSH: Received control message: 'PUSH_REPLY,route 10.0.0.1 255.0.0.0,redirect-gateway def1,route-gateway
dhcp,ping 10,ping-restart 120'
OPTIONS IMPORT: timers and/or timeouts modified
OPTIONS IMPORT: route options modified
OPTIONS IMPORT: route-related options modified
ROUTE default_gateway=161.53.XX.1
OpenVPN needs a gateway parameter for a –route option and no default was specified by either –route-gateway or –ifconfig options
OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.0.0.1
TUN/TAP device tap0 opened
TUN/TAP TX queue length set to 100
NOTE: unable to redirect default gateway — VPN gateway parameter (–route-gateway or –ifconfig) is missing
Initialization Sequence Completed
Best Answer
I'd look at 2 things. First, check your OpenVPN logs, that'll give you more information. I'm going from memory but I think it'll be in
~
.Also, check the Ubuntu firewall settings to be sure that this traffic can get through.
That'll show you the current set of rules.
-- edit
Your log files show that you don't have a gateway defined. According to OpenVPN docs you need to create a
config.ovpn
file and specify its location.You'll address the gateway issue by specifying the route, which is done by including these lines (updated to your network settings, of course). [Source]
Also, its considered bad form or a faux pas to post your question in two Stack Exchange forums.