Small issues with a working vpn tunnel

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
Stefanth
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 04, 2011 12:49 pm

Small issues with a working vpn tunnel

Post by Stefanth » Tue Jan 04, 2011 2:38 pm

Dear Sir or Madame

I have working tun openvpn tunnel between my laptop and my router
but it does not really work as intended.

The whole idea with my vpn installation is that the laptop/home lan should perceive
the laptop as if I was connecting to the home lan with a cable and this independently
where the laptop physical is placed on the planet.

The home lan consist of as router (DIR-825) with DHCP and openvpn installed on it.

After I created the tunnel I am able to ping other units on the home lan and
access them with a browser, the laptop has windows 7.

Issue 1:
When connecting my laptop to the home network with vpn, my laptop does not
get the static IP number that I have setup in the routers DHCP table, instead the
laptop get ip number 10.0.0.6.
How do I configure the server config file so it will use the home lan's DHCP ?


Issue 2:
After I have connected to the home lan with vpn I can not "find" the other units on my home lan.
In windows 7 check my network the NAS on the home network does not show up
but I can ping the NAS, so it seems that windows 7 "discover other network units stuff"
does not work over the vpn tunnel.


Issue 3:
How do I set the name of the VPN tunnel,
If I enter ipconfig on my PC it will say that the home lan name is "Connected to local network 2"
Is this done in the client.opvn file? If so, what is the "command" ?


Issue 4:
According to the laptop this network (vpn tunnel) is a "unidentified network" of the
type "public network", how can I change this to "home network",
This is not really a OpenVPN questions but .. well ... I am writing everything.


Issue 5:
In some postings I can see that people have added "mssfix 1400" in their
configurations files. What does this do ?

Issue 6:
I have been looking around on the http://www.openvpn.net but not been able to
find a document that in detail describe all the various commands that you
can add to the server/client configuration file, can someone give me a tip?


Issue 7:
Is there a good "howto" to set up a OpenVPN bridge on a linux machine ?




The OpenVPN SERVER configure file, openvpn.conf looks like this

Code: Select all

mode server
tls-server

port 1194
proto udp
dev tun

#Certificates
ca /etc/easy-rsa/keys/ca.crt
cert /etc/easy-rsa/keys/XXXXX.XXXX.XXX.crt
key /etc/easy-rsa/keys/XXXXX.XXXX.XXX.key
dh /etc/easy-rsa/keys/dh1024.pem

server 10.0.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"

persist-key
persist-tun

max-clients 3

#comp-lzo

verb 3
keepalive 10 120
log-append /var/log/openvpn/openvpn.log
The OpenVPN CLIENT configure file, client.ovpn looks like this

Code: Select all

client
proto udp
dev tun

remote XXXXX.XXXX.XXX 1194
resolv-retry infinite
nobind

ca ca.crt
cert XXXXXXX.crt
key XXXXXXX.key
dh dh1024.pem


persist-key
persist-tun

# comp-lzo
verb 3
Regards Stefan

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

Re: Small issues with a working vpn tunnel

Post by gladiatr72 » Tue Jan 04, 2011 4:10 pm

Hello,

1. The configuration you are using is known as a "routed" configuration. What this means is that VPN clients are assigned IP addresses on a client network defined in the server configuration--in this case, 10.0.0.0/24. An alternative and somewhat more complex configuration is the "bridged" configuration. You can find examples at http://openvpn.net/index.php/open-sourc ... ation.html and by searching for "openvpn bridge windows server" or some such from your favorite search engine.

2. Since your client is not on your home network, it cannot participate in that network's broadcast domain.

3. start -> control panel -> network something -> advanced something (over on the left side). From there you will see the devices corresponding to any physical network adapters on your system and the TAP-WIN32 device created when you installed OpenVPN. I think you just right click on the tap device and select "rename". Be warned, though, that doing this will require you to specify whatever name you give it in your configuration file.

4. no clue

5. (from the openvpn manual) Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed max bytes.

6. http://openvpn.net/index.php/open-sourc ... pn-21.html

7. see #1.


-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

Stefanth
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 04, 2011 12:49 pm

Re: Small issues with a working vpn tunnel

Post by Stefanth » Tue Jan 04, 2011 7:17 pm

Dear gladiatr72

Thanks a lot for your help, I will look into it as soon as possible,
the bridging seems to be a little more work.

However, because I could ping the NAS I tried to "mount a network place" to
\\192.168.136\stefan
and that worked very well, I can now access the folders on the NAS that have been
"opened" with NFS via the VPN tunnel.

It seems that Windows 7 can not see the NAS given name but still connect to it via it's IP number
and because the DHCP on the home lan gives the NAS the same (static) IP number the
network connection will work all the time either on the home lan or elsewhere via VPN or
after reboot.


Regards Stefan

Post Reply