4

I have an Ubuntu server, it's 3TB HDD space total and 24GB RAM, I want to take 1 little bit of space and RAM to make VPS Windows using VirtualBox or KVM.

I want to install Windows Server 2008 on VirtualBox OR KVM, and I want to remote desktop from my home PC directly to the VPS I create with Vitualbox, and with network on.

But after searching internet for 2 days, I couldn't make it work, especially for the network part.

Here is my /etc/network/interfaces file :

Hetzner Online AG - installimage
 Loopback device:
auto lo
iface lo inet loopback
  device: eth0
 auto  eth0

iface eth0 inet static
    address   46.4.21.70
     broadcast 46.4.21.127
    netmask   255.255.255.192
    gateway   46.4.21.65
     # default route to access subnet
     up route add -net 46.4.21.64 netmask 255.255.255.192 gw 46.4.21.65 eth0
iface eth0 inet6 static
     address 2a01:4f8:131:410c::2
     netmask 64
      gateway fe80::1

The ifconfig command:

eth0      Link encap:Ethernet  HWaddr 6c:62:6d:7a:e8:62
          inet addr:46.4.21.70  Bcast:46.4.21.127  Mask:255.255.255.192
          inet6 addr: fe80::6e62:6dff:fe7a:e862/64 Scope:Link
          inet6 addr: 2a01:4f8:131:410c::2/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:302059 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102335 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:392562631 (392.5 MB)  TX bytes:10964261 (10.9 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:42736 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42736 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3754256 (3.7 MB)  TX bytes:3754256 (3.7 MB)

The IP 46.4.21.70 is my Ubuntu server IP.

I tried set up network for the Virtualbox using NAT : could connect to the internet if using Virtualbox start from it, but I heard people say NAT can't be seen by outside world.

I tried selected Bridged Adapter:

enter image description here

No internet access and here is the ipconfig I did on Windows server in Virtualbox:

enter image description here

I'm very noob on this network thing, could anyone show me step by step how to do it, would be appreciate :D.

5
  • Give a static address for your windows machine that's in the same range of your Ubuntu IP.
    – Maythux
    Commented May 7, 2015 at 5:38
  • @KasiyA Could you show me how to do it? Commented May 7, 2015 at 5:51
  • I don't have a windows machine to show you. But easily go to netwoking in Windows and give an IP To your machine. FROM WINDOWS
    – Maythux
    Commented May 7, 2015 at 5:52
  • @NewUSer with NAT or Bridged Adapter selected? I dont even know which static address have the same range with my Ubuntu server. Commented May 7, 2015 at 6:05
  • In case of bridged go and give an IP for your windows machine..... Normally as if you are using a desktop with Windows inside. just give it an IP that make you get Internet
    – Maythux
    Commented May 7, 2015 at 6:08

1 Answer 1

3

In the ifconfig of the ubuntu machine the ip range is: 46.4.21.65 - 46.4.21.126 (use http://www.subnet-calculator.com/ if you cant work it out)

The ip you specified on the windows server is in the 192.168 range, which is not on the same subnet.

You need to specify the IP in the windows server (to one that is free) something like:

  • IP address: 46.4.21.80
  • Subnet mask: 255.255.255.192
  • Default gateway: 46.4.21.65

DNS server : 208.67.222.222 or a valid internal one if you have one (I assume you might be making the windows server a dns server so you could set it to itself AFTER installing the dns role ie: 127.0.0.1)

This will allow connectivity. One question, why do you have such a strange IP range on the ubuntu server (46.4....) is it a public IP or something? Normally you seperate your servers with a firewall rather than assigning a public IP to the interface, for security concerns.

Pete

17
  • @allenbone Hi there. I tried to make it work by using NAT, and port forwarding the port, and it's working. Thanks for your method, I will try it later though and will let you know if this work too. For the IP, it is the IP that Hetzner (my server provider) gave me, I dont want to mess up with the network so I leave it default. Commented May 7, 2015 at 7:03
  • What I have suggested, will work fine. Just check there is nothing using the same IP I suggested, or use any free one in that range. Are you on a cable network or something - it could be an internal range but 46.4... looks like a public address to me? Normally you have a router separating your internal computers from the outside world. Did they not send you a router? The only reason I ask is that it sounds like the method you are currently using is assigning public IP's to the pc's you have on the network. How do you connect things like your iphone or whatever?
    – allebone
    Commented May 7, 2015 at 7:15
  • No, they dont send a router and I dont seperate any internal comp, They just gave me the IP and ssh detail, that was it. I'm not sure about public IP neither I'm using "attached to NAT" and port forwarding to the port I want to use, then on remote desktop I put the server IP (which is 46.4....) : port number. Still not try the method you suggested, but sure will try it tonight. but hopefully it will work. even it could work but I dont think I know the difference between the 2 methods. Commented May 7, 2015 at 7:51
  • The bridged connector is preferable in my opinion, as it introduces less overhead and processing on the packets moving to and from the NIC. Some functions will not work behind the NAT option, such as if you wanted to configure your windows server to run Routing and Remote access. The bridged adaptor allows these functions to run because there is no NAT in between the Virtual machine and the external world.
    – allebone
    Commented May 7, 2015 at 7:56
  • 1
    I thought you knew it at the first time :D? Oh but that's ok. I guess I can only use NAT, which working for me. Yeah I wanted to find a way to remote it because I dont want to spend extra bucks on another windows server. Thanks for your help then. Although the solution did not work for me but I still give it +1 and accepted answer :D. Commented May 8, 2015 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .