Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - perrfect

#1
Quote from: M4DM4NZ on April 10, 2017, 01:34:53 PM
Hi Guys,

Below is a step by step guide to configuring Opnsense 17.1.4 to route LAN traffic out via your private VPN provider.
(In my case, AirVPN)

I have a setup where I want all computers on my LAN to have a direct connection to the Internet, but "Some" computers I want connected to the VPN *cough torrenting cough *


Hello. Thank you for your article. It really works.
How about Multi WAN?
When we have two OpenVPN clients and two LANs.
LAN1 - VPN1
LAN2 - VPN2
If VPN1 is off, all traffic from LAN1 should go via VPN2.
#2
Hello.
I have the next structure in my Opnsense:
1. WAN interface - access to the Internet via home router
2. LAN interface 1 - private network 192.168.30.1/24
2. LAN interface 2 - private network 192.168.40.1/24
Everything is working correctly. I have access to the Internet from each LAN network.

Also I have 2 OpenVPN servers with the next configurations:

OpenVPN server 1:

local 1.1.1.1
port 1594
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
user nobody
group nobody
persist-key
persist-tun
crl-verify crl.pem
explicit-exit-notify


OpenVPN server 2:

local 2.2.2.2
port 1595
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
auth SHA512
tls-crypt tc.key
topology subnet
server 10.7.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
user nobody
group nobody
persist-key
persist-tun
crl-verify crl.pem
explicit-exit-notify


OpenVPN clients on OpnSense are working correctly!!!!
But there is one but.
They are working correctly only when one of them is running.
OpenVPN clients are not working when they are run together.

The problem is in push "redirect-gateway def1 bypass-dhcp" parameter in OpenVPN server configuration.
OpnSense can't add the same routes:
0.0.0.0/1 and 128.0.0.0/1

And in logs I see
ERROR: FreeBSD route add command failed: external program exited with error status: 1
ERROR: FreeBSD route add command failed: external program exited with error status: 1


When I'm not using the push "redirect-gateway def1 bypass-dhcp" option two OpenVPNs clients are working, but public IP doesn't change to IPs OpenVPNs server.
I need to change my public IP when I'm connecting to the VPNs.

How can I solve the problem?