Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am running a Debian guest VM on Oracle VirtualBox on my Windows machine. I have a DNS server (bind) on the guest that I'd like to see externally from outside the guest OS. How do I give this access to port 53?

My public ip = e.e.e.e
My private ip = i.i.i.i
Virtual box ip = v.v.v.v

There is no bind/dns running on host.

share|improve this question
    
What do you mean by transfer? Do you mean have a specific port visible externally? –  Drav Sloan Sep 7 '13 at 16:08
    
YES, I'm running debian in virtual box with bind and apache. now i want to answers to dns queries coming to my machine (host os) through my virtual box debian (guest os). –  Nishan Sep 7 '13 at 16:20
    
thank you @DravSloan, for putting nice stuff in the question in order to make it more meaningful. –  Nishan Sep 8 '13 at 7:18
add comment

1 Answer

By default Oracle's Virtualbox sets its networking to a NAT mode. In this senario you will have to set it to bridging. Go to the VM in question (in VirtualBox) and edit its settings and set the network mode from NAT to bridging. Note that DHCP will no longer be provided by Virtual Box, but by your standard network DHCP provider if you have one. (If your windows box is set to obtain an IP address automatically then you already have a local DHCP server).

To pick up the new dhcp server's provided address run ps auxwww and look for a process called dhclient. Kill this process and then re-run it with the same command arguments. You should then have a new IP address. Restart your name server /etc/init.d/bind9 restart, and then you should be able to use the DNS server from the IP address provided by ifconfig. (So long as a firewall is not blocking it).

If your Debian guest has no DNS already, then you will have to install it with apt-get install bind9 (ran as root).

share|improve this answer
    
I'm sorry. I wrote There is no bind/dns running on guest. but in fact **There is no bind/dns running on host.**. the guest has bind 9. Thank you. –  Nishan Sep 7 '13 at 16:39
    
You should be able to edit your question and correct that :) –  Drav Sloan Sep 7 '13 at 16:41
    
I did same. BUT NO RESULTS http://www.intodns.com/taxdelhi.com says nameserver not responding. However it works if i do it on real physical machine with debian. –  Nishan Sep 8 '13 at 7:25
    
You will need to port NAT from your External IP (I assume on either firewall host or Router), to the VM's IP address and DNS port. –  Drav Sloan Sep 8 '13 at 10:55
    
i did so, but no results. –  Nishan Sep 8 '13 at 14:16
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.