Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
What is the correct way to route two LANs across two OPNsense devices
« previous
next »
Print
Pages: [
1
]
Author
Topic: What is the correct way to route two LANs across two OPNsense devices (Read 777 times)
tuaris
Jr. Member
Posts: 61
Karma: 4
What is the correct way to route two LANs across two OPNsense devices
«
on:
December 28, 2023, 12:04:10 am »
This is a problem I have struggled with since the days of m0n0wall. Here's a realistic (yet completely made up) scenario:
There are two OPNSense devices, each with there own public IP and private LAN's. Each have the LAN port connected to their own isolated network switch, and each have the WAN port connected to the ISP modems/routers. Lets call them WORK and PLAY
- The LAN subnet for WORK is 172.16.22.0/24
- The LAN subnet for PLAY is 192.168.0.0/24
- There is a computer called OFFICE-PC connected to WORK LAN
- There is a computer called GAME-PC connected to PLAY LAN
- Both OPNSense devices have a (third) extra Ethernet port that is unused
What are my options and what steps must I take (assuming there are no firewalls) so that OFFICE-PC can talk to GAME-PC and vice a versa?
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: What is the correct way to route two LANs across two OPNsense devices
«
Reply #1 on:
December 28, 2023, 12:31:51 am »
Each network is isolated from each other to begin with. They share a path, "the internet", and each goes OUT to them via their gateway, which is their respective WAN. By default nothing coming IN is allowed, that's OPN or any other firewall's job.
Then you have something "listening" on the PC to connect TO. Let's say a webserver listening on port 8080. The webserver software creates a listener on the machine, waiting to get requests on that port.
Now then, putting those two things together we can talk about "how".
One way is a VPN between the two firewalls.
Another is to forward the port from the "receiving" WAN to the "receiving" PC on the port 8080.
And that is in a nutshell the "bits" to thread together.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
What is the correct way to route two LANs across two OPNsense devices