Use OpenVPN to tunnel from LAN to client

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.
Locked
lug-ovpn
OpenVpn Newbie
Posts: 5
Joined: Mon Feb 27, 2017 4:37 pm

Use OpenVPN to tunnel from LAN to client

Post by lug-ovpn » Mon Feb 27, 2017 4:48 pm

Hi,

I have a root server with openvz. (debian 7)
On that server are many virtual servers which are in their own local network 10.0.0.0/24

So I create a new VM with the IP 10.0.0.254 and installed openvpn on it, so when a client connects to it, the client shall have full access to 10.0.0.0/24

But that doesn't really work, if I connect to from my windows 10 machine to the openvpn server I lose my connection to the internet and I dont have access to the 10.0.0.0/24 network.

The strange thing is, when I connect from my android phone, I have internet access, but cant resolve domains, even if I specify a DNS in the server.conf, the client wont get that information..

what am i doing wrong?

server.conf:

Code: Select all

port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
#push "redirect-gateway def1 bypass-dhcp" //
#push "dhcp-option DNS 8.8.8.8" //
#push "dhcp-option DNS 8.8.4.4" //i played around with these options, nothing changes
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem
client-common.txt:

Code: Select all

client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote serverspublicip 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-lzo
setenv opt block-outside-dns
key-direction 1
verb 3
output of ipconfig under windows:

Code: Select all

Ethernet-Adapter Ethernet 3:

   Verbindungsspezifisches DNS-Suffix:
   Verbindungslokale IPv6-Adresse  . : who cares
   IPv4-Adresse  . . . . . . . . . . : 10.8.0.2
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . :
it's german but i think everyone can understand it.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Mon Feb 27, 2017 6:35 pm


lug-ovpn
OpenVpn Newbie
Posts: 5
Joined: Mon Feb 27, 2017 4:37 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by lug-ovpn » Mon Feb 27, 2017 7:43 pm

As I wrote I am from Germany, not China..

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Mon Feb 27, 2017 8:52 pm

Google translate is your friend ..

We prefer English.

lug-ovpn
OpenVpn Newbie
Posts: 5
Joined: Mon Feb 27, 2017 4:37 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by lug-ovpn » Tue Feb 28, 2017 7:10 am

Do you really need a translation for "IPv4-Adresse", "Standardgateway" and "Subnetzmaske"?

Ok, here you go: IPv4-Adress, (standard) gateway, subnet mask

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Tue Feb 28, 2017 2:02 pm

Lese das Howto

:roll:

lug-ovpn
OpenVpn Newbie
Posts: 5
Joined: Mon Feb 27, 2017 4:37 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by lug-ovpn » Tue Feb 28, 2017 2:39 pm

I know the basics of openvpn, but your answer is 0% helpful.
Tell somebody to read 1500 lines is not going to solve the problem.

For example I will not find any information there why

Code: Select all

push "dhcp-option DNS 8.8.8.8"
is not working

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Tue Feb 28, 2017 3:05 pm

lug-ovpn wrote:I know the basics of openvpn,
Nein, das hast du nicht ... weil du das Howto nicht gelesen hast.
lug-ovpn wrote:but your answer is 0% helpful.
Meine Arbeit hat Tausenden von Openvpn-Nutzern geholfen.
lug-ovpn wrote:Tell somebody to read 1500 lines is not going to solve the problem.
Wenn du das Howto nicht liest, wie weißt du, dass es nicht helfen wird?
lug-ovpn wrote:For example I will not find any information there why

Code: Select all
push "dhcp-option DNS 8.8.8.8"

is not working
Was meinen Sie "not working" ?

lug-ovpn
OpenVpn Newbie
Posts: 5
Joined: Mon Feb 27, 2017 4:37 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by lug-ovpn » Tue Feb 28, 2017 3:37 pm

It seems like your not paying attention on my question(s), so I thinkt the best thing is to go somewhere else, where people are willing to help.
And why the hell are you using google translator to speak to me in german? I never asked for that, all I see here is a legit troll, from the first answer on.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Tue Feb 28, 2017 3:49 pm

Please read the howto:
HOWTO: For OpenVPN Community Edition

I think this part is relevant to your problem:
HOWTO: Expanding the scope of the VPN to include additional machines

sygone
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 21, 2017 8:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by sygone » Tue Mar 21, 2017 8:24 pm

Hi I am new to the forums but my openvpn wont connect i have added the client file into where it installed it has been working fine for 3 months but now isnt working. i have reinstalled it also any ideas please

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Use OpenVPN to tunnel from LAN to client

Post by TinCanTech » Tue Mar 21, 2017 8:29 pm


Locked