Routing request from VPN client to an internal server.

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
briansito
OpenVpn Newbie
Posts: 3
Joined: Tue Feb 22, 2011 9:39 am

Routing request from VPN client to an internal server.

Post by briansito » Tue Feb 22, 2011 9:42 am

Hi All,
I am trying to set up the scenario below and would truly appreciate some help.

I have OpenVPN server with 'tun' mode running. Anyone connects to this vpn server is assigned a 10.8… IP

Behind my router there is a server which has a 192.168.. IP.

How would I be able to route requests from a client connected with 10.8.. IP to the internal server?

Thanks,

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

Re: Routing request from VPN client to an internal server.

Post by maikcat » Tue Feb 22, 2011 10:26 am

hi there,

please post your server config and we tell you what to add

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"

briansito
OpenVpn Newbie
Posts: 3
Joined: Tue Feb 22, 2011 9:39 am

Re: Routing request from VPN client to an internal server.

Post by briansito » Fri Feb 25, 2011 4:51 am

Hi Michael..

This is my server config:
-------------------------------------
server 10.8.0.0 255.255.255.0
proto udp
port 10201
dev tun22
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.0.0 255.255.255.0"
push "redirect-gateway def1"
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status
-----------------------------------------
As you can see I enabled pushing LAN to clients, and I'm directing clients internet traffic through my server.

Thanks,

briansito
OpenVpn Newbie
Posts: 3
Joined: Tue Feb 22, 2011 9:39 am

Re: Routing request from VPN client to an internal server.

Post by briansito » Fri Feb 25, 2011 5:04 am

Also one more thing to note:
The requests from the client come on a specific port -say 15050- which the internal server is listening on.

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

Re: Routing request from VPN client to an internal server.

Post by maikcat » Fri Feb 25, 2011 8:01 am

hi briansito,

first

push "redirect-gateway def1"

is not nessesary to use,

has your openvpn server ip forward enabled?
which OS you use?

if you type netstat -nr on your client do you see tha route that server sends?

if you ping openvpn server lan ip ,is it responds?

is your server runs any type of software firewall?

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"

Post Reply