Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a virtualbox lab made up of 4 Windows 2008 R2 servers (DC/DNS,SQL,SHAREPOINT, EXCHANGE) that are configured with static ip addresses with NIC's attached to Internal network. Everything works.

I had the requirement to execute some tests that also access external services available on the internet. To keep things clean and similar to the production environment I have installed another VM, with Ubuntu Server 12.04 64 bit and configured (I hope) to work as a router like described on this post.

This VM has two network interfaces: first is Bridged with the host and is used as a WAN connection and the other one attached in the Internal Network with its own static IP address on the internal network subnet.

But actually the Windows servers does not connect to the internet while the unix one connects.

I did a route command. this is the result:

Kernel IP Routing table
Destination       Gateway        Genmask         Flags   Metric  Ref     Use   Iface
default           10.69.121.1    0.0.0.0         UG      100     0         0   eth0
10.69.121.0       *              255.255.255.0   U       0       0         0   eth0
192.168.83.0      *              255.255.255.0   U       0       0         0   eth1

Can somebody help me with this configuration? :) Thanks!

Addendum: I forgot to mention that one of the windows server hosts a DNS service for which I should maybe configure a forwarding server but I do not exactly know which server to forward on... :(

share|improve this question
    
Can you post your Win clients routing table? Are they being routed through your Ubuntu server? If so, can they "see"(ping) each other? –  Awi Oct 4 '12 at 22:30
    
@Awi: thanks for your answer. What do you exactly mean with client routing table? Yes, I am trying to route them through the the Ubuntu server and I have setup their gateway to the Ubuntu Server IP. They can ping each other and so it is with the ubuntu server... –  Lorenzo Oct 8 '12 at 18:17
add comment

1 Answer

up vote 2 down vote accepted

I assume you are using bridged mode in the vbox adapter that you want to connect to internet in ubuntu server. And have ip_forward=1 set in your sysctl.

Probably your ubuntu server isn't configured to do NAT and the gateway (10.69.121.1) doesn't have your internal network(192.168.83.0) in his routing table, so that's why, you send ping to internet but don't recieve. You have two solutions:

  • Configure route on your gateway to you internal network
  • Configure your ubuntu server to do NAT.

I personally prefer the 2nd option. To do that, you need to use iptables. In your case you want to translate everything that comes out on interface eth0, so the command is:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.