To access my lan subnets

Need help configuring your VPN? Just post here and you'll get that help.

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
sundAr
OpenVpn Newbie
Posts: 3
Joined: Tue Mar 22, 2011 4:09 pm

To access my lan subnets

Post by sundAr » Tue Mar 22, 2011 4:23 pm

hi,
I have configured openvpn in fedora 13.
In my server i am using two ethernet card.eth0 and eth1.eth0- 203.x.x.x it is my vpn server ip.eth1 -192.168.20.x it is my local lan.my vpn pushing ip is 10.8.x.x.
I can connect to openvpn and server gave 10.8.0.6 to client.but i want to access 192.168.20.x lan subnets from outside the network.
what are the changes i have to do in server,client configuration and my server iptables.
please help me i am strugling in this area even i am new for linux.

Thanks,
sundAr.

User avatar
gladiatr72
Forum Team
Posts: 194
Joined: Mon Dec 13, 2010 3:51 pm
Location: Lawrence, KS

Re: To access my lan subnets

Post by gladiatr72 » Tue Mar 22, 2011 4:31 pm

First off, you'll want to read through the openvpn how-to collection http://openvpn.net/index.php/open-sourc ... howto.html. If imagine that you're not running an insanely tight iptables configuration if you're new to the linux arena, so I'll go out on a limb and suggest that you need to add the following to your server configuration:

Code: Select all

push "route 10.8.0.0 255.255.255.0"
If that doesn't solve your problem, please post your client and server configuration (sans comments).

-Stephen
[..]I used to think it was awful that life was so unfair. [...]Wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? -Marcus Cole

sundAr
OpenVpn Newbie
Posts: 3
Joined: Tue Mar 22, 2011 4:09 pm

Re: To access my lan subnets

Post by sundAr » Tue Mar 22, 2011 4:42 pm

hi,
thanks for quick reply
server conf
local 203.x.x.x
proto udp
dev tun,ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key,dh /etc/openvpn/keys/dh1024.pem
server 10.8.0.0 255.255.0.0
ifconfig-pool-persist ipp.txt
push "route 192.168.20.0 255.255.255.0" , client-to-client,keepalive 10 120
comp-lzo max-clients 100 persist-key
persist-tun status openvpn-status.log
verb3

sundAr
OpenVpn Newbie
Posts: 3
Joined: Tue Mar 22, 2011 4:09 pm

Re: To access my lan subnets

Post by sundAr » Tue Mar 22, 2011 4:50 pm

my client configuration i am using windows 7 as a client
client
dev tun
proto udp
remote 203.X.X.X 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo

Douglas
Forum Team
Posts: 285
Joined: Wed Aug 27, 2008 2:41 am

Re: To access my lan subnets

Post by Douglas » Wed Mar 23, 2011 3:20 pm


Post Reply