[How To] Configure WireGuard Site-to-Site VPN on OPNsense (& wg.conf examples)

  Рет қаралды 13,842

0x2142 - Networking Nonsense

0x2142 - Networking Nonsense

Күн бұрын

Пікірлер: 26
@ItsMyWeb
@ItsMyWeb 11 ай бұрын
Thanks! You helped me to get the tunnel working (before your tutorial I wasted hours of lifetime based on other configs)
@mojojojo8751
@mojojojo8751 Жыл бұрын
Dude!! You saved me some struggles here! Great work, nice video and explanations!
@0x2142
@0x2142 Жыл бұрын
Awesome 👍. Glad to hear it, and thanks for the comment!
@an_birb
@an_birb Жыл бұрын
This is my new favorite video :)
@darylferreras6241
@darylferreras6241 Жыл бұрын
Thanks for this video! You've earned a subscriber!
@user-xd7zk1pw5y
@user-xd7zk1pw5y 8 ай бұрын
nice work
@Superturisto
@Superturisto Ай бұрын
Nice video guide! Is it possible to pass local traffic from one site to another as well?
@AllanHjberg
@AllanHjberg 2 ай бұрын
Great video, but I think you should explain the dns server setup, not sure it is clear where the dns server(s) live ?
@troksii
@troksii 10 ай бұрын
I've followed this and several other tutorials. All of them basically similar. Any pointers as to why my SiteB can access anything on siteA. However, SiteA cannot access anything on SiteB. When you try to access SiteB's subnet from SiteA, it tries to route the traffic out the wan. Even though the route to use wg1 is present on SiteA
@HelalKusho
@HelalKusho 2 ай бұрын
There must be something missing in the routing tables inside of the Gateway in SiteA. If a client tries to contact a IP Adress which is not in the same LAN, i routes the traffic to the default gateway (most of times your router or probably in this case the opensense fw), then the gateway sends looks in his routing table whethever he know where to forward that traffic or not, if it doesnt its being passed to the next gateway (your ISP), but if you would add a custom routing entry for the ip subnet of SiteB, then instead of forwarding the traffic to the ISP to look up, it would forward the traffic to your wireguard tunnel.
@troksii
@troksii 2 ай бұрын
@@HelalKusho I got it to work. Firewall rule was wrong
@jonasplett6351
@jonasplett6351 3 ай бұрын
Great video, thanks a lot. Would there be an possibility to make site 2 connect to resources in site 1 via the hqcorp? Remote clients that would connect to hqcorp could still connect to resources in site1 and site 2 (both allowed IP Subnets set) ?
@sudoRoot247
@sudoRoot247 Жыл бұрын
Great video! I am trying to figure out how to tunnel all traffic for only one or two devices over the site to site. All other devices should be split tunnel. Is 'selective routing' what I am looking for? Any ideas? Thank you!
@0x2142
@0x2142 Жыл бұрын
Hey there! Thanks so much for your support! I really appreciate it!! 😊 So, I haven't done this on OPNsense yet, but I have done it on other platforms. With WireGuard, I would use the option to disable routing, so WireGuard doesn't inject any routes automatically - and have the allowed IPs set to 0.0.0.0/0 to allow anything. Then you could use static (or dynamic) routes for the stuff you needed split-tunnel. For the other two hosts, source-based or policy routing to match their source IP and force them over the tunnel. I think in OPNsense, this is done in the firewall rules - where you can match source and/or destination, then set a next-hop gateway: docs.opnsense.org/manual/firewall.html
@sudoRoot247
@sudoRoot247 Жыл бұрын
​@@0x2142 Thank you for the suggestions! I really appreciate it.
@--Des--
@--Des-- Жыл бұрын
Would it be possible to setup Pia VPN with wireguard on OPNsense and creating rules to route specific lan to only NAT out to via the VPN?
@0x2142
@0x2142 Жыл бұрын
Hi there! I did some quick research on PIA, and I'm not 100% sure. It looks like they do support both OpenVPN & WireGuard - but their documentation for router-based VPN connections only reference OpenVPN. But assuming that they do support WireGuard for these types of connections, then yeah that should be doable. If you only need to route specific LAN networks out the VPN, you may need to take a look at policy routing to match those subnets & direct them appropriately.
@--Des--
@--Des-- Жыл бұрын
​@@0x2142 I have managed to do it with FingerlessGlov3s OPNseneePIAWireguard script, and want to share my results. The speedtest difference between openVPN and WG is momentous, from 15Mbps download to 320Mbps, and 10Mbps upload to 200Mbps with the same vpn region.
@sohanhalwa7405
@sohanhalwa7405 Жыл бұрын
Hi, I want to integrate wireguard inside my flutter app. How can i do this? I dont have any basic knowledge about this. To have a connection inside flutter app i need to provide( address, Port , DnsServer, PrivateKey, PublicKey, Endpoint ,presharedKey etc) inside my flutter app. How can i obtain the above parameters. Do i have to use opensense and wireguard app both?
@linearburn8838
@linearburn8838 2 ай бұрын
opnsense changed all the menus at some point now I'm getting lost any chance you could do a update on this
@patrickFREE.
@patrickFREE. 11 ай бұрын
I just have access to my lan, which firewall setting I should watching? (phone + laptop)
@fu1r4
@fu1r4 10 ай бұрын
Maybe you could do a new video how to use the new way to setup a S2S VPN in OPNsense? WireGuard seems to be set to pending removal from OPNsense (It is scheduled to be removed on or after 2023-12-31). Even OpenVPN is about to be removed. Now they have added something called "VPN: OpenVPN: Instances [new]" and i think many users (including me) have no idea on how that work to setup a S2S with partial or full tunnel.
@MPHxthexLegend
@MPHxthexLegend 5 ай бұрын
OPNSense did not remove Wireguard, they removed the plugin, because now there's a kernel integration. This setup is still working form Version 24.1 and newer.
@fu1r4
@fu1r4 5 ай бұрын
@@MPHxthexLegendIt look totally different than in this video. 😒
@MPHxthexLegend
@MPHxthexLegend 5 ай бұрын
@@fu1r4 it only looks but the only tabs that changes is the "Local -> Instances" and "Endpoints -> Peers". The other two moved to Diagnostics tab (Status, Handshakes), they are now combined.
@fu1r4
@fu1r4 5 ай бұрын
@@MPHxthexLegendI only got 100mbit with OpenVPN, but i have now manage to setup WireGuard and i now get 490mbit. I didn't needed to add any rules to the WireGuard (Group). Instead i created a new interface and used that. Now i only want to get some of the computers to be able to access the other OPNsense internet over WireGuard. I have never got that to work, not even with OpenVPN 😪
[How To] Set up WireGuard VPN on OPNsense (& Client Config Examples)
21:58
0x2142 - Networking Nonsense
Рет қаралды 52 М.
[How To] Protect Your Home Network with Mullvad VPN & OPNsense
18:23
0x2142 - Networking Nonsense
Рет қаралды 8 М.
Apple peeling hack
00:37
_vector_
Рет қаралды 82 МЛН
ALL ABOUT VPNs in OPNsense! Wireguard, OpenVPN, and IPSec Setup and Configuration
1:04:14
Virtualizing OPNsense on Proxmox as Your Primary Router
41:08
Home Network Guy
Рет қаралды 61 М.
The OpnSense Series:5. DNS and Website / DNS Block List Setup
17:17
How to Create a Site to Site VPN // OpenWrt, Wireguard
24:49
Dev Odyssey
Рет қаралды 28 М.
Securely Access Your Home Network with WireGuard VPN on OPNsense
25:39
Home Network Guy
Рет қаралды 7 М.
Basic Site-to-Site VPN Using WireGuard and pfSense
45:07
Christian McDonald
Рет қаралды 66 М.
Using WireGuard for Hub and Spoke Site-to-Site VPN
24:03
LinuxCloudHacks
Рет қаралды 1,7 М.
LPC2018 - WireGuard: Next-Generation Secure Kernel Network Tunnel
46:04
Linux Plumbers Conference
Рет қаралды 16 М.