1

I have the following setup:

 --------------------------------      ---------------------------------
|Windows server 2012            |      |PFsense router                 |
|Running OpenVPN server         | <--> |Acts as OpenVPN client         |
|Server has WAN only (80.1.1.1)        |LAN: 192.168.1.1 WAN: 90.1.1.1 |
|OpenVPN IP: 10.8.0.1                  |OpenVPN IP: 10.8.0.6
 --------------------------------      ---------------------------------
                                                    ^
                                                    |
                                                    V

                                        -------------------------------
                                        | Windows client              | 
                                        | LAN: 192.168.1.2            |
                                        -------------------------------

I want the Windows Server 2012 to be able to access the LAN of the PFsense. The Windows client in the PFsense LAN needs to be able communicate with the Server 2012 box as well.

How can I do this?

It would be great if I could integrate the OpenVPN network in the LAN network using the same IP range, but I dont think this is possible. For example if one pings 192.168.1.200 it redirects to the VPN IP 10.8.0.1

0
0

Your question is all about routing.

You basically will need two things.

  • A route on the Windows box directing all the 192.168.1.0/24 to the VPN host.
  • An internal route in OpenVPN directing 192.168.1.0/24 to a particular remote client.

So in your OpenVPN server config you could do something like this.

route 192.168.1.0 255.255.255.0 10.8.0.1

In your ccd file for the remote site add

iroute 192.168.1.0 255.255.255.0

For more info, see:

3
  • 1
    I added route 192.168.1.0 255.255.255.0 10.8.0.1 to the command and restarted OpenVPN. It doenst appear to work. When I ping 192.168.1.1 I get this message: Reply from 109.236.95.209: TTL expired in transit. It looks like I get those messages for all private IP ranges I try to ping btw. Here is the output of my routes on the Windows Server machine:pastebin.com/fGEKdSVg Any thoughts? – Jur Groen Jan 26 '15 at 19:48
  • I cant add a CCD option when using OpennVPN a a client :( openvpn[71475]: Options error: --client-config-dir/--ccd-exclusive requires --mode server – Jur Groen Jan 26 '15 at 20:09
  • 1
    It worked in the end! Route needed to be: route 192.168.1.0 255.255.255.0 Thnx! – Jur Groen Jan 29 '15 at 11:23
0

You can also push a route to the client (Windows 192.168.1.2) from server (Windows 10.8.0.1) with push "route 10.8.0.1 255.255.0.0" in the openvpn-server.conf file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.