Connecting to guest web server
Connecting to guest web server
I seem to have a few problems and I am not sure if its the Host, Client, or VirtualBox that needs reconfiguring
VirtualBox: 5.1.22
Guest: CentOS 7 with server at localhost
Host: Windows 10 Home
VirtualBox network adapter 1: Bridged network (CentOS 7 guest accesses the Internet via bridged network and virtualised Intel adapter)
VirtualBox network adapter 2: Host Only
Windows 10 (Host) ipconfig
Ethernet Adapter VirtualBox Host-Only Network #2: IPv4 192.196.111.1, Subnet 255.255.255.0, Default Gateway /, DHCP disabled
CentOS 7 (guest) IPv4 settings (manual)
Address 192.168.111.2, Netmask 255_255_255_0, Gateway 0_0_0_0, DNS /, Connected @1000Mb/s
CentOS 7 (guest) Firewall Settings
Public allow 443, External allow 443, Work allow 443, Home allow 443, Trusted allow 443
CentOS 7 (guest) web browser / firefox
https://192.168.111.2 [200/Success]
CentOS 7 (guest) Command Line:
ping 192.168.111.1 [no_output/no_exit] - Windows firewall thinks 192.168.111.* is work domain so might be dropping pings
Windows 10 Command Line:
ping 192.168.111.2 [0% loss, Maximum 0ms]
tracert 192.168.111.2 [one hop, <1ms, 192.168.111.2]
Windows 10 (host) web browser / MSIE (Wi-Fi connected)
https://192.168.111.2 [INET_E_RESOURCE_NOT_FOUND/Fail]
Windows 10 (host) web browser / MSIE (Wi-Fi disconnected)
https://192.168.111.2 ["You're not connected"]
ping 192.168.111.2 [0% loss, Maximum 0ms] Phew!
Why would MSIE be looking at the Wi-Fi network instead of VirtualBox Ethernet? Please tell me where I have gone wrong!
VirtualBox: 5.1.22
Guest: CentOS 7 with server at localhost
Host: Windows 10 Home
VirtualBox network adapter 1: Bridged network (CentOS 7 guest accesses the Internet via bridged network and virtualised Intel adapter)
VirtualBox network adapter 2: Host Only
Windows 10 (Host) ipconfig
Ethernet Adapter VirtualBox Host-Only Network #2: IPv4 192.196.111.1, Subnet 255.255.255.0, Default Gateway /, DHCP disabled
CentOS 7 (guest) IPv4 settings (manual)
Address 192.168.111.2, Netmask 255_255_255_0, Gateway 0_0_0_0, DNS /, Connected @1000Mb/s
CentOS 7 (guest) Firewall Settings
Public allow 443, External allow 443, Work allow 443, Home allow 443, Trusted allow 443
CentOS 7 (guest) web browser / firefox
https://192.168.111.2 [200/Success]
CentOS 7 (guest) Command Line:
ping 192.168.111.1 [no_output/no_exit] - Windows firewall thinks 192.168.111.* is work domain so might be dropping pings
Windows 10 Command Line:
ping 192.168.111.2 [0% loss, Maximum 0ms]
tracert 192.168.111.2 [one hop, <1ms, 192.168.111.2]
Windows 10 (host) web browser / MSIE (Wi-Fi connected)
https://192.168.111.2 [INET_E_RESOURCE_NOT_FOUND/Fail]
Windows 10 (host) web browser / MSIE (Wi-Fi disconnected)
https://192.168.111.2 ["You're not connected"]
ping 192.168.111.2 [0% loss, Maximum 0ms] Phew!
Why would MSIE be looking at the Wi-Fi network instead of VirtualBox Ethernet? Please tell me where I have gone wrong!
Re: Connecting to guest web server
Some more good outputs:
Windows 10 (host) with Wi-Fi connected, and CentOS 7 (guest) with VirtualBox network connected
tracert 192.168.111.2 [<1ms 192.168.111.2]
Windows 10 (host) with Wi-Fi connected, and CentOS 7 (guest) with VirtualBox network disconnected
tracert 192.168.111.2 [Destination host unreachable]
This confirms that MSIE is not attempting the same route as network utils such as ping and tracert. I note that Oracle VirtualBox does not set a Default Gateway on its Host Only networks, and I think this might be the problem because MSIE distrusts and ignores the Windows 10 routing table when (non-existing) gateways fail to respond.
Do I need to manually use ROUTE ADD 192.168.111.2 .... , and if so, what address should I provide for the Gateway?
Windows 10 (host) with Wi-Fi connected, and CentOS 7 (guest) with VirtualBox network connected
tracert 192.168.111.2 [<1ms 192.168.111.2]
Windows 10 (host) with Wi-Fi connected, and CentOS 7 (guest) with VirtualBox network disconnected
tracert 192.168.111.2 [Destination host unreachable]
This confirms that MSIE is not attempting the same route as network utils such as ping and tracert. I note that Oracle VirtualBox does not set a Default Gateway on its Host Only networks, and I think this might be the problem because MSIE distrusts and ignores the Windows 10 routing table when (non-existing) gateways fail to respond.
Do I need to manually use ROUTE ADD 192.168.111.2 .... , and if so, what address should I provide for the Gateway?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Connecting to guest web server
I think you need to explain what exactly you are trying to do. The list of connections and disconnections doesn't come across clear to me, unfortunately.
What I do see is you have Bridged and Host-Only in your guest. Do you know what each of these does? See the manual Section 6, especially 6.2, and the table of connections possible.
You presently have two paths of communication between your host and guest because of your network choices. And Bridged is known to not always work with Wi-Fi. So having or not having the Wi-Fi enabled on your host may be influencing the outcome of your pings.
You do point out that you have a fixed IP address set on your guest, set in the range of the Host-Only adapter. But your guest actually has two virtual network cards in it, due to the two kinds of network you chose. Are you sure you set the fixed IP on the guest's Host-Only interface adapter and not the Bridged adapter? You may be connecting through a channel you weren't expecting.
Windows defaults to not respond to Ping (and so may CentOS, I'm not sure). You have to manually set Windows Firewall to respond to ping.
If reading the manual and the above don't clear up the issue you're having, please attach the guest's .vbox 'recipe' file as a zip file, using the Upload Attachment tab under the textbox where you type new posts. You can find the guest's .vbox file by right-clicking the guest in the main Virtualbox window and choosing Show in Explorer. Be sure your host OS is set to show known extensions.
Also, please copy the text outputs of "ipconfig /all" on the host and the Linux equivalent ('ifconfig"?) on the guest, and paste the text into "CODE" tags in the new-post window.
What I do see is you have Bridged and Host-Only in your guest. Do you know what each of these does? See the manual Section 6, especially 6.2, and the table of connections possible.
You presently have two paths of communication between your host and guest because of your network choices. And Bridged is known to not always work with Wi-Fi. So having or not having the Wi-Fi enabled on your host may be influencing the outcome of your pings.
You do point out that you have a fixed IP address set on your guest, set in the range of the Host-Only adapter. But your guest actually has two virtual network cards in it, due to the two kinds of network you chose. Are you sure you set the fixed IP on the guest's Host-Only interface adapter and not the Bridged adapter? You may be connecting through a channel you weren't expecting.
Windows defaults to not respond to Ping (and so may CentOS, I'm not sure). You have to manually set Windows Firewall to respond to ping.
If reading the manual and the above don't clear up the issue you're having, please attach the guest's .vbox 'recipe' file as a zip file, using the Upload Attachment tab under the textbox where you type new posts. You can find the guest's .vbox file by right-clicking the guest in the main Virtualbox window and choosing Show in Explorer. Be sure your host OS is set to show known extensions.
Also, please copy the text outputs of "ipconfig /all" on the host and the Linux equivalent ('ifconfig"?) on the guest, and paste the text into "CODE" tags in the new-post window.
Re: Connecting to guest web server
I need to respond properly some other time. As a quick brain dump..
Wi-Fi hosts the Bridged network only, and I am certain the guest's 192.168.111.2 is assigned to the Virtualbox Host-Only interface.
I think my 2nd post shows that Ping is using the correct interface, but that MSIE and Ping are each sending requests down different interfaces - this seems to me evidence that the two interfaces are setup correctly, Ping happily binds to either interface, but MSIE is (annoyingly) programmed to bind itself to one interface only (described in my 2nd post).
I had a rummage around the web and it seems this is a common problem. Binding MSIE to two different interfaces does require adding a route to the routing table, and to do that you need to know the gateway on the second network. Following from this, some forums suggest Virtuabox creates the gateway automatically, and the IP address of that Gateway is logged in Virtualbox log file on the host - but its not clear if this process applies equally to all Virtualbox network types (i.e. the examples I saw posted on other forums were all using NAT interfaces). I will investigate my Virtualbox log files later...
Thanks
Wi-Fi hosts the Bridged network only, and I am certain the guest's 192.168.111.2 is assigned to the Virtualbox Host-Only interface.
I think my 2nd post shows that Ping is using the correct interface, but that MSIE and Ping are each sending requests down different interfaces - this seems to me evidence that the two interfaces are setup correctly, Ping happily binds to either interface, but MSIE is (annoyingly) programmed to bind itself to one interface only (described in my 2nd post).
I had a rummage around the web and it seems this is a common problem. Binding MSIE to two different interfaces does require adding a route to the routing table, and to do that you need to know the gateway on the second network. Following from this, some forums suggest Virtuabox creates the gateway automatically, and the IP address of that Gateway is logged in Virtualbox log file on the host - but its not clear if this process applies equally to all Virtualbox network types (i.e. the examples I saw posted on other forums were all using NAT interfaces). I will investigate my Virtualbox log files later...
Thanks
Re: Connecting to guest web server
Unfortunately I did not find any answers in the log files.
2. Without breaking the Guest Internet access - this currently works fine using the Bridged Wi-Fi interface when it is physically switched on
Here is the information you asked to see:
Ipconfig /ALL (above) shows "Network #2" is enabled, and VBox.log shows "Adapter #2" is the one being used:
Meanwhile, VirtualBox.xml suggests "Adapter #2 DHCP" is not enabled, which I think is also correct (although not sure why the other one is enabled?):
The .vbox extension is not allowed.
Hope you can help!
1. View Guest/HTTPS output on the Host/MSIE (and any other browsers in the home network if possible) - I am trying to do this using the Host-Only interfacescottgus1 wrote:I think you need to explain what exactly you are trying to do.
2. Without breaking the Guest Internet access - this currently works fine using the Bridged Wi-Fi interface when it is physically switched on
Here is the information you asked to see:
Code: Select all
C:\Users\muddle>ipconfig /ALL
Windows IP Configuration
Host Name . . . . . . . . . . . . : WIN
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter VirtualBox Host-Only Network #2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter #2
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::206e:c9:ad35:13e3%6(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.111.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 101318695
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-E3-D2-36-D8-CB-8A-D2-AF-AB
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Wireless LAN adapter Local Area Connection* 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wi-Fi:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 3165
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Code: Select all
00:00:01.543184 [/Devices/e1000/1/LUN#0/Config/] (level 5)
00:00:01.543185 IfPolicyPromisc <string> = "deny" (cb=5)
00:00:01.543185 IgnoreConnectFailure <integer> = 0x0000000000000000 (0)
00:00:01.543186 Network <string> = "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2" (cb=65)
00:00:01.543186 Trunk <string> = "\DEVICE\{11C256EE-2788-4E3A-BD5B-6A1A60AD3EA4}" (cb=47)
00:00:01.543187 TrunkType <integer> = 0x0000000000000003 (3)
Code: Select all
<DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.56.100" networkMask="255.255.255.0" lowerIP="192.168.56.101" upperIP="192.168.56.254" enabled="1"/>
<DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2" IPAddress="0.0.0.0" networkMask="0.0.0.0" lowerIP="0.0.0.0" upperIP="0.0.0.0" enabled="0"/>
Code: Select all
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-windows">
<Machine uuid="" name="CentOS 7" OSType="RedHat_64" snapshotFolder="Snapshots" lastStateChange="2017-08-13T16:27:37Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="" location=".vdi" format="VDI" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="" location=".iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="Shutdown"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="0,23,640,480,max"/>
<ExtraDataItem name="GUI/RestrictedRuntimeDevicesMenuActions" value="HardDrives"/>
<ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/>
<ExtraDataItem name="GUI/StatusBar/IndicatorOrder" value="HardDisks,OpticalDisks,FloppyDisks,Network,USB,SharedFolders,Display,VideoCapture,Features,Mouse,Keyboard"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="true"/>
<X2APIC enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="1024"/>
<Display VRAMSize="16"/>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<BridgedInterface name="Intel(R) Dual Band Wireless-AC 3165"/>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="" cable="false" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter #2"/>
</Adapter>
<Adapter slot="2" type="82540EM"/>
<Adapter slot="3" type="82540EM"/>
<Adapter slot="4" type="82540EM"/>
<Adapter slot="5" type="82540EM"/>
<Adapter slot="6" type="82540EM"/>
<Adapter slot="7" type="82540EM"/>
</Network>
<AudioAdapter codec="AD1980" driver="DirectSound" enabled="true"/>
<RTC localOrUTC="UTC"/>
<Clipboard mode="Bidirectional"/>
<DragAndDrop mode="Bidirectional"/>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1502641657041876900" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true"/>
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid=""/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Connecting to guest web server
Thanks for the info, and especially for the CODE tags. There's some things to be said so far, but I just want to be sure about one more thing: How about the "ifconfig" from the Linux guest?
Thus...muddle wrote:The .vbox extension is not allowed.
scottgus1 wrote:please attach the guest's .vbox 'recipe' file as a zip file
Re: Connecting to guest web server
Virtualbox guest addons are not installed.
This output has been through OCR, which is why some characters are missing or changed..
This output has been through OCR, which is why some characters are missing or changed..
Code: Select all
[muddle@1ocalhost ~]$ ifconfig
enp0s3: f1ags=4163<UP,BROADCAST,RUNNIN6,MULTICAST> mtu 1500
inet 192.168.1.45 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6a5b:3c93:f?f3:1f?f prefixlen 64 scopeid 0x20<1ink>
ether 08:00:21:24:51:31 txqueuelen 1000 (Ethernet)
RX packets 1095 bvtes 209616 (204.? Ki8)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 893 bvtes 81116 (?9.2 Ki8)
TX errors 0 dropped 0 overruns 0 carrier 0 co11isions 0
enp0s8: f1ags=4163<UP,BROADCAST,RUNNIN6,MULTICAST> mtu 1500
inet 192.168.111.2 netmask 255.255.255.0 broadcast 192.168.111.255
inet6 fe80::d6fd:6b21:cf3d:c0cc prefixlen 64 scopeid 0x20<1ink>
ether 08:00:21:52:33:ff txqueuelen 1000 (Ethernet)
RX packets 2?? bvtes 1?584 (1?.1 Ki8)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8248 bvtes 806415 (?8?.5 Ki8)
TX errors 0 dropped 0 overruns 0 carrier 0 co11isions 0
1o: f1ags=?3<UP,LO0P8ACK,RUNNING> mtu 65536
inet 12?.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
1oop txqueuelen 1 (Local Loopback)
RX packets 20??9 bvtes 188?601 (1.8 M18)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20??9 bvtes 188?601 (1.8 M18)
TX errors 0 dropped 0 Everruns 0 carrier 0 co11isions 0
virbr0: f1ags=4099<UP,8ROADCAST,MULTICA8T> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 53 53 ff 99 ff 66 txqueuelen 1000 (Ethernet)
RX packets 0 bvtes 0 (0.0 8)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bvtes 0 (0.0 8)
TX errors 0 dropped 0 overruns 0 carrier 0 co11isions 0
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Connecting to guest web server
Firewall? Redhat and Redhat based OSes usually deny all ports unless you enable them.
Re: Connecting to guest web server
Good shout but I think iptables is set OK?
This is localhost only but shows the port open:
Not sure about Windows firewall and (I am fairly sure) I tried with the firewall switched off and found no change. May need to try that again another time..
Code: Select all
[muddle@localhost]$ sudo iptables -L | grep 443
[muddle@localhost]$ sudo iptables -L | grep https
ACCEPT tcp -- anywhere anywhere dpt:https
ACCEPT tcp -- anywhere anywhere dpt:https ctstate NEW
[muddle@localhost]$
Code: Select all
[muddle@localhost]$ netstat | grep https
tcp 0 0 localhost.localdo:39700 localhost.localdo:https ESTABLISHED
tcp6 0 0 192.168.111.2:https 192.168.111.2:39700 ESTABLISHED
[muddle@localhost]$
Last edited by muddle on 17. Aug 2017, 01:17, edited 1 time in total.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Connecting to guest web server
Yup it is set but does not show any open ports with your list tag
Re: Connecting to guest web server
Can you please tell me which command you would like the output for? OCR did not like this one so typing a few lines..
Code: Select all
[muddle@localhost]$ netstat -lt
Active Internet connections (only servers)
tcp 0 0 localhost.locald:domain 0.0.0.0:* LISTEN
tcp6 0 0 [::]:https [::]:* LISTEN
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Connecting to guest web server
If the web server is running I expect to see the iptable show it is:
You can see how to enable these by searching your version on line. I don't do a lot with RPM based OSes but it should be similar. Since the network is working this of course falls outside the scope of this forum.
Code: Select all
[oracle@localhost ~]$ sudo iptables -L | grep http
ACCEPT tcp -- anywhere anywhere tcp dpt:http ctstate NEW
[oracle@localhost ~]$
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Connecting to guest web server
OK, thanks for the ifconfig - it shows you have three adapters, besides the 127.0.0.1 typical loopback connection, in the Linux guest:
enp0s3, at 192.168.1.45; enp0s8, at 192.168.111.2; and virbr0, at 192.168.122.1
The Windows ipconfig shows only the Host-Only adapter being active, at 192.168.111.1. I will wager that your 'enp0s8' is the Host-Only interface in the guest OS: .111.1 and .111.2, same network. I will guess that enp0s3 is your Bridged connection: 192.168.1.### is more common for home networks than 192.168.122.###. (aside: 'virbr0' googles to a virtual adapter that may exist in Linux distros for use when the Linux OS is hosting a virtual machine, so I don't think this one is connected to your host PC.)
The .vbox 'recipe' shows two networks enabled: Slot 0 Bridged to 'Intel Dual-Band Wireless' and slot 1 connected to Host-Only #2. The DHCP server is off for #2, but if you set 192.168.111.2 as a static IP on the enp0s8 adapter in the guest, no DHCP won't be a problem.
However, there is a problem: see in the .vbox file where the Adapter slot="1" is mentioned, later in the line you will see 'cable="false" '? This means the virtual "cable" that runs between the Host-Only adapter on the host and the enp0s8 adapter on the guest is unplugged. Can't get network if the cable's unplugged... And yet, funny to mention, the Windows ipconfig shows only the Host-Only active; the other host network adapters are disconnected, so Bridged shouldn't be working now....
You have had two active network connections at the same time between the host and the guest: via Bridged and via Host-Only. I am not thoroughly aware of all possible outcomes in this situation, but some of your unstable pinging above may come from the network trying one interface then the other to get the ping through. This is just a guess. And Bridged is known to not always work with Wi-Fi. That may cause some of the "does-one-thing-when-Wi-Fi-is-on-another-when-it's-off" stuff. And not having the Host-Only cable connected or the rest of the host adapters disconnected doesn't help.
My recommendation is this: simplify. Have only one connection between host and guest. (You should be able to have two, and they should operate independently, but we aren't there to see what folks set up, possibly incorrectly, so there's no telling what may be in the way by the time we hear of it on the forum.) If Bridged works on your Wi-Fi setup, disable the Host-Only. If you saw the manual, you will know that Bridged puts the guest in the same network that the host is connected to, so the guest looks like just one more PC on the home/office network. You can communicate between host and guest via Bridged, just as if the guest were another PC sitting next to your real PC. You can set a static IP in the guest, at an unused number in the real network's IP address range, if you want.
If you really want the Host-Only, then don't use Bridged. Use NAT instead. NAT will send internet into your guest in just about any situation where your host can access internet. NAT is very robust. It does not allow typical communication into the guest from the host, so you will have just the one channel between host and guest (via Host-Only) and the internet connection via NAT. (This Host-Only/NAT setup is the go-to solution for where Bridged does not work with Wi-Fi.)
enp0s3, at 192.168.1.45; enp0s8, at 192.168.111.2; and virbr0, at 192.168.122.1
The Windows ipconfig shows only the Host-Only adapter being active, at 192.168.111.1. I will wager that your 'enp0s8' is the Host-Only interface in the guest OS: .111.1 and .111.2, same network. I will guess that enp0s3 is your Bridged connection: 192.168.1.### is more common for home networks than 192.168.122.###. (aside: 'virbr0' googles to a virtual adapter that may exist in Linux distros for use when the Linux OS is hosting a virtual machine, so I don't think this one is connected to your host PC.)
The .vbox 'recipe' shows two networks enabled: Slot 0 Bridged to 'Intel Dual-Band Wireless' and slot 1 connected to Host-Only #2. The DHCP server is off for #2, but if you set 192.168.111.2 as a static IP on the enp0s8 adapter in the guest, no DHCP won't be a problem.
However, there is a problem: see in the .vbox file where the Adapter slot="1" is mentioned, later in the line you will see 'cable="false" '? This means the virtual "cable" that runs between the Host-Only adapter on the host and the enp0s8 adapter on the guest is unplugged. Can't get network if the cable's unplugged... And yet, funny to mention, the Windows ipconfig shows only the Host-Only active; the other host network adapters are disconnected, so Bridged shouldn't be working now....
You have had two active network connections at the same time between the host and the guest: via Bridged and via Host-Only. I am not thoroughly aware of all possible outcomes in this situation, but some of your unstable pinging above may come from the network trying one interface then the other to get the ping through. This is just a guess. And Bridged is known to not always work with Wi-Fi. That may cause some of the "does-one-thing-when-Wi-Fi-is-on-another-when-it's-off" stuff. And not having the Host-Only cable connected or the rest of the host adapters disconnected doesn't help.
My recommendation is this: simplify. Have only one connection between host and guest. (You should be able to have two, and they should operate independently, but we aren't there to see what folks set up, possibly incorrectly, so there's no telling what may be in the way by the time we hear of it on the forum.) If Bridged works on your Wi-Fi setup, disable the Host-Only. If you saw the manual, you will know that Bridged puts the guest in the same network that the host is connected to, so the guest looks like just one more PC on the home/office network. You can communicate between host and guest via Bridged, just as if the guest were another PC sitting next to your real PC. You can set a static IP in the guest, at an unused number in the real network's IP address range, if you want.
If you really want the Host-Only, then don't use Bridged. Use NAT instead. NAT will send internet into your guest in just about any situation where your host can access internet. NAT is very robust. It does not allow typical communication into the guest from the host, so you will have just the one channel between host and guest (via Host-Only) and the internet connection via NAT. (This Host-Only/NAT setup is the go-to solution for where Bridged does not work with Wi-Fi.)
Re: Connecting to guest web server
Those particular settings are possibly misleading you because my security policy is to manually disconnect idle connections, and the posted settings files were not all captured in the same moment.scottgus1 wrote:However, there is a problem: see in the .vbox file where the Adapter slot="1" is mentioned, later in the line you will see 'cable="false" '? This means the virtual "cable" that runs between the Host-Only adapter on the host and the enp0s8 adapter on the guest is unplugged. Can't get network if the cable's unplugged... And yet, funny to mention, the Windows ipconfig shows only the Host-Only active; the other host network adapters are disconnected, so Bridged shouldn't be working now....
I concur.scottgus1 wrote:You have had two active network connections at the same time between the host and the guest: via Bridged and via Host-Only. I am not thoroughly aware of all possible outcomes in this situation, but some of your unstable pinging above may come from the network trying one interface then the other to get the ping through. This is just a guess.
Is this possibly why I had the next problem?scottgus1 wrote:And Bridged is known to not always work with Wi-Fi.
I actually added Host-Only because Bridged seemed to not allow the Host connect to the Guest. Will try Bridged in isolation (again) and let you know..scottgus1 wrote:Bridged puts the guest in the same network that the host is connected to, so the guest looks like just one more PC on the home/office network. You can communicate between host and guest via Bridged, just as if the guest were another PC sitting next to your real PC.
Re: Connecting to guest web server
An earlier post showed the same output for https. There is no http server here.Perryg wrote:If the web server is running I expect to see the iptable show it is:
You can see how to enable these by searching your version on line. I don't do a lot with RPM based OSes but it should be similar. Since the network is working this of course falls outside the scope of this forum.Code: Select all
[oracle@localhost ~]$ sudo iptables -L | grep http ACCEPT tcp -- anywhere anywhere tcp dpt:http ctstate NEW [oracle@localhost ~]$