Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Second Gateway Address on LAN Interface
« previous
next »
Print
Pages: [
1
]
Author
Topic: Second Gateway Address on LAN Interface (Read 4585 times)
wisesongs
Newbie
Posts: 8
Karma: 0
Second Gateway Address on LAN Interface
«
on:
March 24, 2020, 11:42:16 pm »
I have OPNsense 20.1 running on my router. The present configuration has a gateway on the LAN interface address that passes traffic to a commercial VPN using OpenVPN. How can I add a second gateway address that sends traffic directly to the WAN interface?
Logged
banym
Sr. Member
Posts: 468
Karma: 31
Free Human Being, FreeBSD, Linux and Mac nerd
Re: Second Gateway Address on LAN Interface
«
Reply #1 on:
March 25, 2020, 09:04:56 am »
What are your intentions? You can add static routes for specific networks?
Logged
Twitter: banym
Mastodon: banym@bsd.network
Blog:
https://www.banym.de
wisesongs
Newbie
Posts: 8
Karma: 0
Re: Second Gateway Address on LAN Interface
«
Reply #2 on:
March 25, 2020, 05:19:47 pm »
What I would like to do is have the computers on the LAN network choose whether they are going to access the internet directly or via a VPN by choosing a different gateway address. So if your gateway is 192.168.0.1 you go to the internet via the ISP, or if the gateway is 192.168.0.2 you go to the internet via the VPN.
Logged
wisesongs
Newbie
Posts: 8
Karma: 0
Re: Second Gateway Address on LAN Interface
«
Reply #3 on:
March 27, 2020, 04:37:59 pm »
Here is a posting that is close to what I am trying to do:
https://www.neverslair-blog.net/2015/08/01/pfsense-how-to-bypass-a-vpn-connection-for-a-single-ip/
The difference is that rather than setting firewall rules on the router for every computer bypassing the VPN, I would like to have the client choose by manually setting the gateway address.
Logged
wisesongs
Newbie
Posts: 8
Karma: 0
Re: Second Gateway Address on LAN Interface
«
Reply #4 on:
March 27, 2020, 11:20:45 pm »
This post is pretty much the same question I have:
https://forum.opnsense.org/index.php?topic=12294.0
The answer to the post did not help me though. If I add an Alias IP address to the LAN interface, I don't see how to detect that address in the rules. It would not be the source or destination address.
Logged
wisesongs
Newbie
Posts: 8
Karma: 0
Re: Second Gateway Address on LAN Interface
«
Reply #5 on:
April 10, 2020, 06:14:35 pm »
Here is a post that describes using subnetting rather than gateway address to decide what traffic goes through the VPN:
https://forum.opnsense.org/index.php?topic=1951.0
It still requires manually setting the client IP address to make the switch.
Logged
wisesongs
Newbie
Posts: 8
Karma: 0
Re: Second Gateway Address on LAN Interface
«
Reply #6 on:
April 19, 2020, 04:53:51 pm »
Here is another post with exactly the problem I would like to solve, adding a second gateway to the LAN interface:
https://forum.opnsense.org/index.php?topic=12294.msg56833#msg56833
The suggested solution was to add a virtual IP address, then add firewall rules to "create policy based routing." I tried to do that but it did not work for me. Could someone please post the rules that would be required? I have a working VPN tunnel to Private Internet Access called PIAVPN.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Second Gateway Address on LAN Interface