Able to connect to tun, but can't ping or access anything

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
dmhead
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 03, 2011 8:05 pm

Able to connect to tun, but can't ping or access anything

Post by dmhead » Thu Feb 03, 2011 8:35 pm

Hi all,

The company I am at has OpenVPN with a tap and a tun interface. The company has about 6 people in the US, and a few remotely. They want to restrict a couple of the remote users to only be able to access one server. I have been asked to help. Unfortunately, I am new to OpenVPN.

When I connect to the tun, I get an expected IP (10.9.0.1) with an expected subnet mask (/30). However, I am unable to ping anything, even the OpenVPN Server itself.

However, if I connect through the tap, everything seems to work fine. Unfortunately, it will be harder to filter a specific user's access using the bridged connection, or so I seem to understand by reading the client specific rules and access policies section of the documentation (http://openvpn.net/index.php/open-sourc ... tml#policy).

Hopefully, I am just doing something dumb, and you can correct me quickly.

BTW: The server is CentOS 5.3, and the client is Win7 if it matters...

Here are my configs:

Server server_tun.conf
config_tun.conf
port 1195
proto udp
dev tun
ca easy-rsa/keys/ca.crt
cert easy-rsa/keys/server.crt
key easy-rsa/keys/server.key
dh easy-rsa/keys/dh1024.pem
server 10.74.106.0 255.255.255.0
ifconfig-pool-persist ipp_tun.txt
10.74.105.199
push "route 10.74.105.0 255.255.255.0"
client-config-dir ccd
route 10.9.0.0 255.255.255.252
push "dhcp-option DNS 10.74.105.30"
client-to-client
keepalive 10 120
comp-lzo
max-clients 20
persist-key
persist-tun
status openvpn-status-tun.log
verb 3
Server ./ccd/dan
ifconfig-push 10.9.0.1 10.9.0.2
Client vpn_tun.ovpn
client
dev tun
proto udp
remote mycompany.dyndns.org 1195
resolv-retry infinite
nobind
persist-key
persist-tun
ca fl-ca.crt
cert client-dmhead.crt
key client-dmhead.key
ns-cert-type server
comp-lzo
verb 3
Thank you all, in advance! I appreciate any assistance that can be offered!

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Able to connect to tun, but can't ping or access anythin

Post by maikcat » Fri Feb 04, 2011 7:36 am

hi dmhead,

>ifconfig-push 10.9.0.1 10.9.0.2

you giving your client ip 10.9.0.1 but

>server 10.74.106.0 255.255.255.0

your tun ip interface is 10.74.106.1......

try to give your client ip from 10.9.0.0/24 range fe 10.9.0.10

also you MUST run openvpn gui with admin rights on win 7...
cheers,

michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

dmhead
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 03, 2011 8:05 pm

Re: Able to connect to tun, but can't ping or access anythin

Post by dmhead » Sat Feb 05, 2011 12:36 am

Michael,

You are a genius! Well, you solved my problem anyway. Thank you!

Now I just have to get iptables working right.

Post Reply