OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • I would like to implement two routers in one
« previous next »
  • Print
Pages: [1]

Author Topic: I would like to implement two routers in one  (Read 1973 times)

e1e0n

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
I would like to implement two routers in one
« on: May 20, 2023, 01:01:23 am »
I would like to implement two routers in one, ie I would like to have 2 WAN and 2LAN ports. Traffic should be isolated. I can't select ip4 gataway for LANs :(. pfSense allows this easily. Please, how can I do that? Default setting would just choose one upstream gateway and use it. I tried setting Firewall rules but they don't seem to work :((((
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6935
  • Karma: 584
    • View Profile
Re: I would like to implement two routers in one
« Reply #1 on: May 20, 2023, 11:08:09 am »
This works perfectly well if done correctly. Please show your configuration - just two sentences stating "it doesn't work" is too little information to help you.

Essentially you need to

- set up 2 WAN ports and gateways
- set up 2 LAN ports without gateways
- set NAT to manual
- create two outbound NAT rules - one for each WAN port with one of the LAN networks as source
- create two permit rules - one for each LAN ports, explicitly setting the desired WAN gateway

HTH,
Patrick
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

e1e0n

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: I would like to implement two routers in one
« Reply #2 on: May 20, 2023, 01:33:41 pm »
Thanks, I though about that, full manual, but I am not very confident in doing that :) Will the auto generated rules be preserved? Do I need to recreate bunch of all other autogenerated rules? I don't really understand many of them. Would be nice to have ability just to override them. I was suspicious that autogenerated rules are messing with me :)
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6935
  • Karma: 584
    • View Profile
Re: I would like to implement two routers in one
« Reply #3 on: May 20, 2023, 04:28:19 pm »
You need just one manual NAT rule for each WAN interface. I run all my OPNsense firewalls in manual NAT mode.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

e1e0n

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: I would like to implement two routers in one
« Reply #4 on: May 20, 2023, 10:59:46 pm »
Gotta try after long weekend ;)
Logged

e1e0n

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: I would like to implement two routers in one
« Reply #5 on: May 23, 2023, 03:04:44 am »
Quote from: pmhausen on May 20, 2023, 11:08:09 am
This works perfectly well if done correctly. Please show your configuration - just two sentences stating "it doesn't work" is too little information to help you.

Essentially you need to

- set up 2 WAN ports and gateways
- set up 2 LAN ports without gateways
- set NAT to manual
- create two outbound NAT rules - one for each WAN port with one of the LAN networks as source
- create two permit rules - one for each LAN ports, explicitly setting the desired WAN gateway

HTH,
Patrick

for >> - create two permit rules - one for each LAN ports, explicitly setting the desired WAN gateway

When I set Gateway in LAN rules (to WAN_DHCP in my case) it blocks traffic. Setting to '*' enables. I am at the dead end  :(
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • I would like to implement two routers in one
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2