Hyper v opnsense + bridge

Started by Marinoz, November 09, 2023, 08:04:20 PM

Previous topic - Next topic
I use hyper v windows 10 pro without license opnsense and I've configured everything. Let's note that I'm a newbie and that I just started learning. So I very set my speedport plus to bridge mode and I'm trying to connect it to my opnsense vm. How is that possible ?

What without license? What bridge are you talking about?

Quote from: Bob.Dig on November 09, 2023, 08:50:02 PM
What without license? What bridge are you talking about?

Windows 10 pro without license key. About the bridge my gateway has two modes bridge connection and route I ve chose bridge.  Shouldn't I?

So your ISP router goes in bridge mode so that another device behind it becomes the router and gets the public ip. That is what will be your WAN on your OPN VM.
So your VM needs at least two interfaces, one for WAN and one for LAN. Virtual nic or passthrough are options to do it and depend on your preference and hardware capability.
Depending on the host you are using to virtualise, this can be an easy experiment or a hard one as it could mean bridging your only physical interface and needing to use terminal to interact with the host.
Instead of asking generic questions, I suggest to draw and describe well your setup, including the physical elements.

Can I use my LAN  (virtual external switch linked to a real nic) to give internet to my router through the WAN port ?

That's pretty much the point of a firewall/router, isn't it?

Internet -- ISP modem -- WAN -- firewall -- LAN -- internal network.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on November 10, 2023, 07:07:43 AM
That's pretty much the point of a firewall/router, isn't it?

Internet -- ISP modem -- WAN -- firewall -- LAN -- internal network.

Yes but the whole point is I want wifi, wlan
Quote from: cookiemonster on November 10, 2023, 12:01:47 AM
So your ISP router goes in bridge mode so that another device behind it becomes the router and gets the public ip. That is what will be your WAN on your OPN VM.
So your VM needs at least two interfaces, one for WAN and one for LAN. Virtual nic or passthrough are options to do it and depend on your preference and hardware capability.
Depending on the host you are using to virtualise, this can be an easy experiment or a hard one as it could mean bridging your only physical interface and needing to use terminal to interact with the host.
Instead of asking generic questions, I suggest to draw and describe well your setup, including the physical elements.

Here s the setup internet>optic fiber> huwaei terminal>firewall> and here I want wifi/wlan

Quote from: Marinoz on November 10, 2023, 12:14:30 PM
Quote from: Patrick M. Hausen on November 10, 2023, 07:07:43 AM
That's pretty much the point of a firewall/router, isn't it?

Internet -- ISP modem -- WAN -- firewall -- LAN -- internal network.

Yes but the whole point is I want wifi, wlan


Internet -- ISP modem -- WAN -- firewall -- LAN -- switch -- WLAN access point
                                                     |
                                                     |
                                            wired internal network

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

Quote
Here s the setup internet>optic fiber> huwaei terminal>firewall> and here I want wifi/wlan
Logical setup yes but if you are virtualising it via HyperV, I'm asking for the physical setup. Unless the thread title is now innacurate.
Quote from: Marinoz on November 10, 2023, 06:58:25 AM
Can I use my LAN  (virtual external switch linked to a real nic) to give internet to my router through the WAN port ?
Again a generic question that without the fully described setup is pretty much pointless, as it will just lead to question after question because from your point of view "doesn't work".

Quote from: Patrick M. Hausen on November 10, 2023, 12:57:47 PM
Quote from: Marinoz on November 10, 2023, 12:14:30 PM
Quote from: Patrick M. Hausen on November 10, 2023, 07:07:43 AM
That's pretty much the point of a firewall/router, isn't it?

Internet -- ISP modem -- WAN -- firewall -- LAN -- internal network.

Yes but the whole point is I want wifi, wlan






Internet -- ISP modem -- WAN -- firewall -- LAN -- switch -- WLAN access point
                                                     |
                                                     |
                                            wired internal network






No need for switch I will use the one lan port. Router can act as a switch cant it? By router I mean the isps gateway

Quote from: cookiemonster on November 10, 2023, 01:05:05 PM
Quote
Here s the setup internet>optic fiber> huwaei terminal>firewall> and here I want wifi/wlan
Logical setup yes but if you are virtualising it via HyperV, I'm asking for the physical setup. Unless the thread title is now innacurate.
Quote from: Marinoz on November 10, 2023, 06:58:25 AM
Can I use my LAN  (virtual external switch linked to a real nic) to give internet to my router through the WAN port ?
Again a generic question that without the fully described setup is pretty much pointless, as it will just lead to question after question because from your point of view "doesn't work".



What setup do you exactly need? The hardware ?

Quote from: Marinoz on November 10, 2023, 01:05:34 PM
No need for switch I will use the one lan port. Router can act as a switch cant it? By router I mean the isps gateway
No it cannot. If you put the ISP router into modem mode it becomes part of the WAN side of your OPNsense firewall. It must not have any connection to LAN. That's why you need all LAN ports necessary on the OPNsense - or a separate switch. Similarly - which you did not explicitly state - if the WiFi is currently part of that ISP box you cannot use that in the future. That's why you need a separate access point.

A firewall divides the network into an "evil" Internet side and a "good" private side. I guess - that's why everybody is asking for more details - your currents setup is:

Evil Internet -- ISP box with modem and WiFi all in one -- good private net.

Once you introduce OPNsense into the mix that changes to:

Evil Internet -- ISP box in modem mode -- WAN-OPNsense-LAN -- good private net.

See how the ISP box is now part of the "evil" side of things. Everything from your LAN to the Internet and vice versa (if permitted) must go through OPNsense.

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

Quote from: Marinoz on November 10, 2023, 01:06:36 PM
Quote from: cookiemonster on November 10, 2023, 01:05:05 PM
Quote
Here s the setup internet>optic fiber> huwaei terminal>firewall> and here I want wifi/wlan
Logical setup yes but if you are virtualising it via HyperV, I'm asking for the physical setup. Unless the thread title is now innacurate.
Quote from: Marinoz on November 10, 2023, 06:58:25 AM
Can I use my LAN  (virtual external switch linked to a real nic) to give internet to my router through the WAN port ?
Again a generic question that without the fully described setup is pretty much pointless, as it will just lead to question after question because from your point of view "doesn't work".



What setup do you exactly need? The hardware ?


i think i wasnt clear enough. I didnt put the speedport in modem mode but bridge (it may be the same but just to clarify some things) and i said that i will connect the router to the lan side of the opnsense firewall i never mentioned the wan. I understand hiw a firewall works, it has to be between the traffic.

problem is how do i connect the router in bridge mode with the opnsense firewall (FROM THE LAN SIDE OF THE OPNSENSE) because its wireless and more complex

You can't. Your OPßnsense must have a WAN and a LAN side and you connect the modem to WAN only.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)