VPN with DHCP from server LAN
-
Hi everyone,
I need to setup a VPN between two sites like this:
HOME PFSense
1st NIC -> WAN
2nd NIC -> LAN 192.168.1.0/24 with DHCP server
3rd NIC -> not usedREMOTE SITE PFSense
1st NIC -> WAN
2nd NIC -> LAN 10.98.0.0/24 with DHCP server
3rd NIC -> VPN tunnel to HOME LAN (every client connected to this interface have to obtain an IP from home's DHCP server 192.168.1.x)It's possible to do that with an OpenVPN in TAP mode, or somehow?
Thank you
-
@djdmx why do they need to be on the same network?
-
@johnpoz because there's an hub that can only discover devices on his same network
-
@djdmx Yes, tap mode will work.
-
@jarhead thank you, can you tell me how to configure it and how to assign the tunnel to the 3td NIC?
-
@djdmx
https://docs.netgate.com/pfsense/en/latest/recipes/openvpn-bridged.html -
@jarhead thank you so much, I'll try and let you know
-
@djdmx
Just to add, if you don't have at least a 500/500 internet at both sites, it's gonna be tough.
tap vpn's were always frowned upon but it was never the vpn, just because the internet connections weren't fast enough.I remember I hit a few snags setting it up so any problems you have, just post here. I should be able to remember what I did.
-
@jarhead thank you!
I set up correctly PFSense at home as OpenVPN server, in tap mode, and bridge with LAN interface.Now I have to configure the second PFSense as OpenVPN client and assign it to 3rd NIC.
Any suggestion? -
@jarhead I have some problems with tunnel configuration:
I set up server side in Peer to Peer (Shared Key) mode (in this mode it's not possible to select "Bridge DHCP", and the same Peer to Peer (Shared Key) mode on the PfSense client.
On the server I create a bridge with openvpn and LAN.
The tunnel is working (client correctly connect to the server), but it doesn't obtain an ip address from server's LAN DHCP. -
@djdmx said in VPN with DHCP from server LAN:
Peer to Peer (Shared Key
That is going away anyway - I would suggest from doing any sort of anything with shared key as the setup
https://redmine.pfsense.org/issues/12981
Warn about OpenVPN shared key deprecation -
@johnpoz Thank you, I know that. It's only for the first test
-
I did it!
This is my configuration:
SERVER
OpenVPN settings:
Peer to Peer (Shared Key)
Tap mode
UDP on IPV4
Interface WAN
Port 1194
Data encryption (default 256-bit)
Tunnel IP4 network 192.178.168.0/30Interfaces:
OpenVPN interface assigned to OPT1
Bridge with LAN and OPT1Firewall rules:
WAN -> permit UDP 1194 from any to WAN
OPT1 -> permit any IPv4 from any to any
BRIDGE -> permit any IPv4 from any to any
OPENVPN -> permit any IPv4 from any to anyCLIENT
OpenVPN settings:
Peer to Peer (Shared Key)
Tap mode
UDP on IPV4
Interface WAN
Server host -> my_server_IP
Server Port 1194
Data encryption (default 256-bit)
Tunnel IP4 network 192.178.168.0/30OpenVPN interface assigned to OPT1
Bridge with LAN2 and OPT1 with DHCP IPv4 addressFirewall rules:
OPT1 -> permit any IPv4 from any to any
LAN2 -> permit any IPv4 from any to any
BRIDGE -> permit any IPv4 from any to any
OPENVPN -> permit any IPv4 from any to anyNow I'll try to move to Peer to Perr (SSL/TLS) ;-)
-
@djdmx Good to hear!!
Sorry I haven't answered any of your posts, just getting over the flu. But you didn't need my help anyway!