notebook <-> external server <-> office LAN

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
LarsDaniel
OpenVpn Newbie
Posts: 1
Joined: Thu Oct 07, 2010 3:51 am

notebook <-> external server <-> office LAN

Post by LarsDaniel » Thu Oct 07, 2010 1:07 pm

Hi there,

I would like to connect my notebook to the office LAN using an external server.
Here is a graphical explanation: http://imagebin.org/117473

Server and client in LAN are running Debian Lenny, notebook can run Windows or Lenny, too.
Connection between server and client in LAN already works: IPs can be pinged, but hostnames can't be.
I don't care about the notebook right now, first the connection between server and client and LAN should work fine.

My goal: I want to use WINS or DNS of office LAN to access the hostnames and network shares. Also, using the office LAN's gateway from the notebook would be a great benefit for the future.

Info:
Without CCD-file, I can't ping any IP in LAN.

config of server:

Code: Select all

mode server
proto tcp
dev tun
verb 4
comp-lzo
keepalive 15 120
ifconfig-pool-persist ipp.txt
status status openvpn-status.log
local <hidden>
port 443
server 172.16.0.0 255.255.255.0

user nobody
group nogroup
client-config-dir ccd

;script-security 2
;up /etc/openvpn/update-resolv-conf
;down /etc/openvpn/update-resolv-conf

route 10.0.0.0 255.0.0.0
push "route 10.0.0.0 255.0.0.0"
push "route 172.16.0.0 255.255.255.0"

push "dhcp-option DNS 10.0.100.1"
push "dhcp-option WINS 10.0.100.2"
push "dhcp-option DOMAIN <hidden>.<hidden>.local"
client-to-client

persist-key
persist-tun

ca /opt/keys/ca.crt
cert /opt/keys/server.crt
key /opt/keys/server.key
dh /opt/keys/dh1024.pem

plugin /usr/lib/openvpn/openvpn-auth-pam.so common-auth
client-cert-not-required
username-as-common-name
ccd:
iroute 10.0.0.0 255.0.0.0
config of client in LAN:

Code: Select all

client
proto tcp
dev tun
nobind
pull
verb 4
comp-lzo
remote <hidden> 443
resolv-retry infinite

persist-key
persist-tun

user nobody
group nogroup

ca /opt/keys/ca.crt
auth-user-pass
Best regards,
Lars-Daniel

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: notebook <-> external server <-> office LAN

Post by krzee » Wed Oct 13, 2010 7:51 pm

you probably want udp instead of tcp
http://sites.inka.de/~bigred/devel/tcp-tcp.html

your server can do this:
push "dhcp-option DNS x.x.x.x"
push "dhcp-option WINS x.x.x.x"

Post Reply