portforwarding with bridged network?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
retraction
Posts: 3
Joined: 30. Mar 2014, 14:54

portforwarding with bridged network?

Post by retraction »

I have a virtualbox running windows 7 and I need portforwarding. I can't use NAT, I need bridged networking. My router is set up correctly and I can see port 1604 on master computer, but on the vm, I can't access port 1604. Any ideas on how to do this?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: portforwarding with bridged network?

Post by mpack »

Port forwarding and bridged networking are mutually exclusive concepts.

With bridged networking your VM is a direct participant on the external network. There is no intermediate layer which can buffer and forward packets. The VM receives every ethernet packet sent to its MAC address, plus broadcasts - i.e. it receives everything, so the notion of forwarding just makes no sense.
retraction
Posts: 3
Joined: 30. Mar 2014, 14:54

Re: portforwarding with bridged network?

Post by retraction »

mpack wrote:Port forwarding and bridged networking are mutually exclusive concepts.

With bridged networking your VM is a direct participant on the external network. There is no intermediate layer which can buffer and forward packets.
Okay, ermm. I didn't really understand that. In short, does that mean that port-forwarding to port 1604 is impossible with bridged?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: portforwarding with bridged network?

Post by mpack »

I'm saying that port 1604 doesn't exist when you use bridged. Bridged network cards talk at the ethernet level. TCP/IP protocol layers are implemented by the guest OS.

The only way data can turn up on port 1604 inside the guest OS is for the other end of the TCP/IP connection to send it to that address.
CharmingNathan
Posts: 57
Joined: 29. Mar 2014, 21:08

Re: portforwarding with bridged network?

Post by CharmingNathan »

mpack wrote:I'm saying that port 1604 doesn't exist when you use bridged. Bridged network cards talk at the ethernet level. TCP/IP protocol layers are implemented by the guest OS.

The only way data can turn up on port 1604 inside the guest OS is for the other end of the TCP/IP connection to send it to that address.
mpack and retraction I apologise for coming into a thread which isn't 'mine', but I am trying to resolve a very similar, if not the same issue:

My setup is a Windows 200 Server host with Virtual Box installed and Debian as the guest, inside the V.M. I have a requirement to install a piece of software that will accept sound streams generated on the Windows platform, send into the V.M., onto the guest (Debian), then onto the outside world. I am told that my situation is either complicated or simplified (depending on whom I am talking to), by the fact that my server is connected to the Internet by a Fibre Optic MODEM, NOT a Router.

I was advised I needed a Bridged Network which I have setup between the LAN and Host-Only Adapter for Virtual Box in Windows, as if I attempt the same in the V.M., it becomes disconnected from the Internet, and that I need N.A.T. port forwarding enabled.

I have already been advised by perryg here, who appeared to concur that I needed to study Chapter 6 of the V.M. instruction manual, and did indeed net N.A.T. enabled with the Host-Only Adapter - but is that within Windows or the V.M., and do I need the Windows bridge?
retraction
Posts: 3
Joined: 30. Mar 2014, 14:54

Re: portforwarding with bridged network?

Post by retraction »

mpack wrote:I'm saying that port 1604 doesn't exist when you use bridged. Bridged network cards talk at the ethernet level. TCP/IP protocol layers are implemented by the guest OS.

The only way data can turn up on port 1604 inside the guest OS is for the other end of the TCP/IP connection to send it to that address.
Okay, can you elaborate a bit more on your second line?
Martin
Volunteer
Posts: 2567
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: portforwarding with bridged network?

Post by Martin »

With bridged networking your virtual machine acts like a normal standalone PC on your network.
So you would need to look at the network configuration inside the virtual machine.
CharmingNathan
Posts: 57
Joined: 29. Mar 2014, 21:08

Re: portforwarding with bridged network?

Post by CharmingNathan »

Martin wrote:With bridged networking your virtual machine acts like a normal standalone PC on your network.
So you would need to look at the network configuration inside the virtual machine.
Martin, would that apply even in the case of the Host (Windows) being connected to the Internet via a Modem, and not a Router? Also, would the bridged connections (presumably in Windows) be between the LAN and V.M. Host-Only Adapter?

I would assume Windows would then allocate this "Mini Port" (as Windows states on my server) a kind of internal Static I.P. address that packets can be sent to and received from as they would in a 'normal' standalone P.C.?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: portforwarding with bridged network?

Post by mpack »

@Nathan: If you have a modem then you don't have a host NIC. That also means that I don't see how you can be using Bridged, and hence I don't know why you are commenting in this thread?

You also can't have used VirtualBox bridged networking to bridge the VM to the host only adapter. That would be nonsense. If you're talking about a bridging feature provided by the host OS then you certainly should not use that to bridge between two incompatible networks, i.e. the virtual "Host Only" network and physical internet.

You really should start your own thread, but I'll tell you quickly that with a (USB?) modem you reallly only have two choices. One is to use NAT mode, the other is for the VM to capture the USB device directly. Host only mode and bridged mode are not applicable.
CharmingNathan
Posts: 57
Joined: 29. Mar 2014, 21:08

Re: portforwarding with bridged network?

Post by CharmingNathan »

mpack wrote:@Nathan: If you have a modem then you don't have a host NIC. That also means that I don't see how you can be using Bridged, and hence I don't know why you are commenting in this thread?
Good point mpack! I think it's called getting confused!

However, I am using a N.I.C. to an extent in as much as that is the connection my Fibre Optic modem has to the server, and why I am trying to establish a connection between it my server, the V.M., and the guest, and its installed software which needs to communicate with both host and guest...
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: portforwarding with bridged network?

Post by mpack »

retraction wrote:Okay, can you elaborate a bit more on your second line?
There is no intermediate filtering, the packet will always be delivered to the TCP socket indicated in the packet header, as set by the sender. So if you want it to arrive on a different socket you need to reconfigure the sender. It may also be possible to reconfigure the sockets layer inside the guest, and it's possible some routers could have a port forwarding feature, you'd have to check the appropriate manuals - it isn't a VirtualBox matter.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: portforwarding with bridged network?

Post by mpack »

CharmingNathan wrote:However, I am using a N.I.C. to an extent ...
To an extent? NIC = Network Interface Card. You are either using the one in your host PC or you aren't. If you're using a modem then you aren't, you have a different issue from the OP, and you should please start your own topic to discuss your problem.
CharmingNathan
Posts: 57
Joined: 29. Mar 2014, 21:08

Re: portforwarding with bridged network?

Post by CharmingNathan »

mpack wrote:
CharmingNathan wrote:However, I am using a N.I.C. to an extent ...
To an extent? NIC = Network Interface Card. You are either using the one in your host PC or you aren't. If you're using a modem then you aren't, you have a different issue from the OP, and you should please start your own topic to discuss your problem.
I did offer an apology earlier in the thread for coming in with my issue, but felt they were related.

There is a N.I.C. in the host machine (Windows 2003 Server), and as I stated previously my Fibre Optic modem connects to the machine using it, and the actual connection within in the server is via a Dial Up Networking connection.

However, as you suggested, as my problem concerns a Modem not a router connecting in the conventional manner, as it were, I shall start my own thread.
Post Reply