this post was submitted on 05 Jan 2024
20 points (100.0% liked)

Selfhosted

40132 readers
572 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I am going to build a router with OPNSense (in Proxmox, on an HP thin client). I am stuck with setting up the networking (I have the Inel 4-port card). I don't really know how to get started. Right now my device has one LAN cable going into it, and my consumer router is doing everything. I can set up a bridge for the other ports, but what IP address will I use for the LAN? I can't use 192.268.0.1 because that will collide with my consumer router. Do I just take my consumer router offline while I am setting this up?I'd rather not because for sure I will get stuck and will want to look something up online. I guess I could use my phone but not the best when I am trying to see someone setting up something like this.

Silly question, I know, but I just can't think of a clean way to get this going with minimal disruption. In a nutshell, what's a good strategy for setting up and testing the OPNSense while it's not actually doing any routing and then seemlessly drop it in and start working on it?

all 11 comments
sorted by: hot top controversial new old
[–] reddthat@reddthat.com 6 points 10 months ago (1 children)

Your router's IP can be anything. Choose any internal IP address on your subnet.

You can have 2 routers on the same subnet just make sure you disable DHCP on the new one while you perform the setup of everything else.
Then when you want to switch over, toggle on dhcp on the new router and replace the cables and you should be fine. You'll know it's working when you plug into it and get a default route of the new router.

[–] skipmorrow@lemmy.world 1 points 10 months ago (2 children)

Let's see if I got this... great idea to disable DHCP on the new OPNSense for now. I forgot about that. Just keep the one LAN cable going in, and I will just keep the IP address as it is right now (.79). Not even worry about the WAN port at all. Set up all of the features, including things like reserved IP addresses and whatnot. Then, when I am ready to drop it in, I will turn the old router off, and on the new router set up a static IP on the LAN port (.0.1) and add the WAN port (DHCP). Drop it in place, turn on DHCP and I'll be good to go.

[–] theit8514@lemmy.world 4 points 10 months ago

Sounds about right, just be aware that your LAN and WAN networks need to be different, so you'll likely need to change your old router's dhcp subnet. E.g. 192.168.1.1/24 on the WAN and 192.168.0.1/24 on the LAN.

[–] reddthat@reddthat.com 3 points 10 months ago

Yep. Keep the WAN port dhcp Client enabled if you can, just one less thing to worry about.

Also take note that when you change the static IP of the new router it would conflict with the old one (and dhcp might fail). So you might need to set your local clients IP. Take note of the configuration it has and the steps to set it manually.

The rest all sounds right.

[–] scholar@lemmy.world 2 points 10 months ago (1 children)

Are you able to change the ip address of your current router?

[–] skipmorrow@lemmy.world 0 points 10 months ago

Yeah, but I'd rather not change it because I am pretty sure there are some devices in the house where I set up static IP addresses. I try not to do that, but over the years, I am pretty sure there are at least a couple. Heh, maybe a good time to seek them out!

[–] Petter1@lemm.ee 2 points 10 months ago* (last edited 10 months ago)

Plug your phone into the pc and choose to trust the PC. This should share your mobile internet with your PC

I use it all the time, when I distrohop on my laptop with a wifi card that needs to download b43 from the internet before WiFi works 🤪

Definitely unplug existing router, else you may end up with a doubleNAT.. I have a physical opnsense (without wifi antenna) plugged between my IPS router which in modem mode and another proprietary router which acts as bridge and wifi access point.

[–] fuckwit_mcbumcrumble@lemmy.world 2 points 10 months ago

When I install a new router I do the initial install with all network connections disconnected (physically or virtually since it’s proxmox). Once I get my IPs and ports set how I want I do the switcherydoo and disconnect the old one and connect the new one.

If you’re using the same subnet and your router has the same IP address the only down time should be the process of connecting devices, and maybe a bit for DHCP on your wan side. All internal devices should continue working fine, but expect their IPs to jump around as they get new DHCP leases.

[–] Decronym@lemmy.decronym.xyz 1 points 10 months ago* (last edited 10 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
AP WiFi Access Point
IP Internet Protocol
IoT Internet of Things for device controllers

3 acronyms in this thread; the most compressed thread commented on today has 4 acronyms.

[Thread #405 for this sub, first seen 6th Jan 2024, 04:35] [FAQ] [Full list] [Contact] [Source code]

[–] filister@lemmy.world 1 points 10 months ago

You need to have a dedicated WAN interface, where you connect your WAN cable. The rest of the ports must be put into bridge mode.

You need to create VLANs, one for the WAN, then your home network, eventually your IoT network, guest network, etc. and expose those VLANs to the respective bridge ports.

You would also need an AP that supports VLANs, so anything that runs OpenWRT or other supported device. The routing would be done on the OPNSense's side.

On the Proxmox you need to expose the network ports to the VM running OPNSense.

But there are more steps involved and if someone can share a step-by-step guide explaining the whole process would be better.