Forums

Resolved
1 votes
Hi Everyone,

I have just signed to the ClearOS forum and am a total newbie even though I have other related IT experience.

Currently I am just experimenting with clearos so I can learn about it.

Therefore I have Oracle VirtualBOX on my windows 10 computer.

I want to install ClearOS community version as a VM.

I want to have ClearOS attached to a NAT interface (to hide it from the main windows 10 network).

So I created 2 network interface in VB:

1) NAT interface
2) Host only network interface

Then I want Clear OS to access the internet from within the nat interface.

I started to install it and configured an ethernet interface as LAN static 192.168.7.10 and another ethernet interface EXTERNAL as static 192.168.136.10.

When I run the ClearOS wizard it fails the DNS check.

I can ping the Virtualbox hostonly interface at 192.168.136.10 and can use my web browser to go to https://192.168.136.10:81, but it fails the dns test.

Shoud I setup some sort of static route from the 192.168.7.10 LAN interface?

I could not find anything in the network card GUI configuration page in regards to static routes.

Maybe I am wrong.

Can someone steer me in the right direction, give me a recommendation?

Thanks

Best regards

Alfred56
Saturday, February 24 2018, 11:25 AM
Share this post:
Responses (6)
  • Accepted Answer

    Tuesday, February 27 2018, 09:00 AM - #Permalink
    Resolved
    -1 votes
    Have a look at the VB networking documentation.

    A host only WAN interface allows the the WAN to communicate with the PC but no further.
    A NAT LAN interface will allow the LAN to get a 10.0.x.y IP address.

    Unfortunately for you, when ClearOS is in gateway mode, like any other router, if there you try to contact any IP address not associated with ClearOS then it sends the traffic through the gateway i.e. the WAN interface. Your WAN interface is host only so the traffic won't go anywhere.

    If you bridge your LAN interface so it gets a LAN IP, you can get round the DNS issue by specifying a LAN IP (your router?) as a DNS server. As this is a local address it will work, but ClearOS still will not be able to contact the outside world.

    To get ClearOS to work sensibly, its WAN interface needs outside connectivity via your LAN. You can achieve that with a NAT or bridged interface. When you do that you, don't want your ClearOS LAN to be able to communicate with your LAN, so don't bridge it as well. If you NAT your WAN, to connect to ClearOS from your desktop you will need to port forward 127.0.0.1 and the relevant ports through VB. This is the set up as I run it. If you want to connect from your LAN to ClearOS you will need to open ports in your Desktop firewall and port forward in VB.

    If you do as Dave says, ClearOS will pull a WAN IP address directly from your normal DNS server (router?). It will be directly addressable from anywhere on your LAN with the normal restrictions of a ClearOS WAN interface (so its incoming firewall rules).
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 26 2018, 10:57 PM - #Permalink
    Resolved
    0 votes
    Dave Loper wrote:

    I would recommend using bridge for your outside facing interface so that ClearOS pulls and IP address from the same network and physical NIC as your host. Then, you can use an internal interface for other virtual machines that you want to appear 'behind' the ClearOS virtual server. I use this for testing gateway features in ClearOS.


    Hi Dave, thank you for replying.

    Anyway my concept of NAT VMs was wrong to begin with. It looks like that when you use a NAT interface on VirtualBox your NAT IP address of the VM will always be at 10.0.2.15, your gateway at 10.0.2.2 and your dns at 10.0.2.3. I cannot access this from the host computer.

    Therefore VB provides the feature of the VirtualBox Virtual host-only ethernet adapter to communicate with the VM from the host machine.

    I have a virtual host-only ethernet adapter called VirtualBox Host-Only Ethernet adapter #2 configured at 192.168.136.1/24, this becomes the gateway address for your clearos external adapter.

    So I configure the ClearOS external ethernet adapter at 192.168.136.4 for example, I can ping it from the host machine. I leave the ClearOS LAN adapter at dhcp 10.0.2.15 (in manual mode it does not work). Even though I can ping the ClearOS VM from the host machine at 192.168.136.4 and access the configuration page at https://192.168.136.4:81, the setup wizard fails DNS resolution using 8.8.8.8 and 8.8.4.4. I also tried opendns, same result.

    I tried this setup, which is stated to work from VirtualBox documentation, with a couple of Windows 7 VMs that I have on the host machine and they work perfectly.

    What is causing the ClearOS setup wizard to fail dns resolution?

    Thanks

    Regards

    Alfred56
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 26 2018, 06:37 PM - #Permalink
    Resolved
    0 votes
    I would recommend using bridge for your outside facing interface so that ClearOS pulls and IP address from the same network and physical NIC as your host. Then, you can use an internal interface for other virtual machines that you want to appear 'behind' the ClearOS virtual server. I use this for testing gateway features in ClearOS.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, February 25 2018, 09:26 AM - #Permalink
    Resolved
    0 votes
    I am not familiar with Host Only interface. Both mine are NAT'ed. because they are NAT'd they get VB internal IP's of 10.0.2.x and 10.0.3.x. These are NAT'd through to my PC. In order to access the WAN on the PC VM I need to set up port forward rules from 127.0.0.1 to 10.0.2.x within VB. If I wanted to have the VM accessible on the LAN, I assume by extension, I'd need to set up port forward rules from the desktop LAN IP to VB and also open the ports in Win10. I don't know how you'd ping through NAT as ICMP is a port-less protocol so port forwarding does not make sense. I have a feeling for your LAN you may want a Bridge adaptor.

    From your first scenario, what DNS servers have you used? If your WAN is host only does that mean it can't receive DNS services through the WAN. In that case you'll need to point you WAN DNS servers manually to something which is accessible via your LAN NIC when that is working.

    One problem I can envisage is that your WAN is your default route for all external contact so I don't see how things like the marketplace will work, but, as I said, VM's are not my strong point.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 24 2018, 10:13 PM - #Permalink
    Resolved
    0 votes
    Hi Nick,

    thank you for your reply.

    I could easily configure the VirtualBox VM network card just using a single bridged mode adapter and it will work.

    But what I want to do, is to have the VM with a NAT network card so it is on a different subnet compared to my main host subnet.

    Normally with a NAT interface the VM is invisible to the host operating system. I cannot ping the VM NAT interface from Windows 10.

    The Oracle VB documentation states that if I want to access the VM from the host I have to configure a host-only interface as well.

    Therefore the VM will have a hostonly interface and a NAT interface, 2 virtual network cards.

    I have done this and I still cannot ping the NAT interface of ClearOS, only the hostonly NIC.

    In ClearOS network card configuration I have:

    1 LAN ethernet adapter configured with static IP 192.168.7.10
    1 External ethernet adapter configured with static 192.168.136.10

    Regards

    Alfred56
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 24 2018, 05:54 PM - #Permalink
    Resolved
    0 votes
    It really depends on what you are trying to do with the VM. I have a similar set up but I just use the WAN interface. You can't have both connected to your Win10 machine without creating a routing loop.

    You could try ClearOS in standalone mode so you still get all the functionality without the router facilities. If you do that, you connect the External interface to your Win10 an not an internal interface.

    In my set up I have ClearOS in gateway mode but connected by its WAN to my Win10 box. I have a couple of other interfaces defined to play with different configurations (PPPoE, multiwan, DMZ, dual LAN and so on), but I never connect those interfaces to the Win10 box.

    What are you trying to do with the VM?
    The reply is currently minimized Show
Your Reply