LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 11-07-2010, 03:46 PM   #1
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Rep: Reputation: 25
Talking Port Forwarding VBox 3.2.10


Hi Guys,

I am getting confuse in trying to forward port 53 (BIND9) from guest SlackWare 13.1 64-bit to host Windows 7 64-bit.
As per manual, I need to use the vbox command line utility "VBoxManage"
# VboxManage modifyvm "VM name" --natpf1 "guestdns,tcp,,53,,53" --> which I have done as such. When I reboot my VM and check to see if the port 53 was indeed forwarded, i get nothing. To check if the port was forwarded, I use
# VBoxManage.exe getextrada SlackWare131 enumerate
That command line reveals that the port 53 was not forwarded.
I tried to forward the port with "setextradata" as such
# VBoxManage.exe setextradata "name of vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNS/HostPort" 53
# VBoxManage.exe setextradata "name of vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNS/GuestPort" 53
# VBoxManage.exe setextradata "name of vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNS/Protocol"TCP
But again to no avail.
I did allow Vbox to passthrough the Windows 7 firewall.
I cant seem to be able to work this out and any help would be much appreciated

I am having a bit of a doubt as far as the name of the network adatper. I am doing NAT and the adapter as the value of 1. So as per manual the name "natpf1" seems to be right but since all my efforts have come to no good, I am doubting myself now and if you guys could confirn that as well

PS: Could it be that on a unix platfomr you need to be root to forward port below 1024. Hence not allowing to do so on the gues SlackWare131 64-bit ?
If that is the case, how could I run my DNS Server (BIND9) in my VM ?

Kind Regards,

Last edited by riganta; 11-07-2010 at 03:49 PM.
 
Old 11-07-2010, 07:11 PM   #2
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
I have got news..
I found out that the issue of me not being able to forward any port is due to me not knowing the type of network adapter VBox is emulating and therefore inputing the wrong emulation type in my command line. My VM is emulating Intel PRO/1000 MT Desktop (82540EM). I cannot find the right name for this emulation. If anyone out there could help me, that would be much appreciated..
I did issue a couple of commands on the host to forward other port than 53. Above 1024. I forwarded the port 3128 which worked when I had a look at the XML file. Due to the wrong emulation name for the NIC, when I restarted my VM I got this error:

Failed to open a session for the virtual machine SlackWare
unknown error creating VM
(VERR_CFGM_INVALID_CHILD_PATH)

Result Code:
E_FAIL (0x80004005)
Component:
Console
Interface:
IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

I issued a port forward with emulator: natpf1, e1000, 82540EM but to no avail. The port forwarding worked but every single time when I rebooted my VM I got the error mentionned above. My VM did not accept those names.
I then had the idea of changing the adapter to PCnet-PCI II (Am79C970A). The VM worked and could connect to the internet. I then issued a port-forward command for port 3128 which worked as per XML file. When I rebooted, I got the error mentionned above again.
This is a complete deadlock for me. I hope someone has the solution for me as this VM is suppose to run SQUID and BIND9. Big bump..... The host being windows is not really helping either. I have very little experience with WIndows and that does not help..

Kind Regards,

Last edited by riganta; 11-07-2010 at 07:14 PM.
 
Old 11-08-2010, 12:41 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Have you looked in the ~/.VirtualBox/Machines/<machine name>/<machine name>.xml file? It lists the adapter types in use in the Network section.

Alternatively VBoxManage showvminfo <machine name> | grep '^NIC ' | grep -v disabled
 
Old 11-08-2010, 01:09 PM   #4
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
Thanks catkin for your reply.
yes I checked the xml file.
<Adapter slot="1" enabled="false" MACAddress="080027A28F22" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
I used adapter type mentionned in the XML file above and still got the error message mentionned in my last message.

Kind Regards,
 
Old 11-10-2010, 11:26 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
The thread is marked SOLVED; if you solved it, would you like to share the solution?
 
Old 11-12-2010, 10:56 AM   #6
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
I did not really solved anything. For some unknown reasons to me, no adapter was being recognized when trying to forward my ports in a NAT mode. I tried on two VMs that I have running; one of slackware and the other one of Ubuntu. Both gave me the same error message everytime (mentionned in my message above). I therefore decided to bridge all my VMs. It does make it easier because I can now more easily communicate with my VMs from externally. NAT was kicking my ass so bad that for the moment I will keep bridging until I find out why the adapter used is not recognized when doing port forwarding. I have a feeling its a simple thing but have no idea what it is..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port Config B/W VBox and external system ssatl2002 Linux - Newbie 2 05-25-2010 12:18 AM
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 04:36 PM
Forwarding a PORT to VBox Tux-Slack Linux - Networking 0 05-29-2007 01:11 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration