asterisk/debian guest networking question

Discussions about using Linux guests in VirtualBox.
Post Reply
will65
Posts: 2
Joined: 11. Aug 2008, 00:23

asterisk/debian guest networking question

Post by will65 »

Hello all. I have a debian guest install (Host os is ubuntu 8.04) and am having a few issues with networking. The guest can see the inet, and can see my shared folders on different machines on the lan. I cannot ping the guest os from any machine and I cannot ping any other machine from the guest os. They are obviously working because I can pull files down from the other machines on the guest system.

The issues comes into play more so when I'm trying to configure a couple of sipura spa-2000 boxes (ethernet voip devices) to see the asterisk server. Being that the guest is on 10.0.3.x and the host is 192.168.5.x, and the sipura boxes are also on the 192. I would also like to be able to ssh into the box for configuration as it's sitting on a system that doesn't have a monitor setup all the time.

I've gone through the manual, but I'm unsure exactly as to how, or even if what I'm trying to do is possible. The only thing I could find that was appeared to be the same issue was bridging. Am I in the right area there? The host os is currently setup with 1 virtual nic set as NAT. Can anyone help me with this issue? Thanks in advance.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Yes you are correct. This is a NAT feature. You need to read the Wiki article on NAT to understand what it is and what its limitations are. VBox NAT provides what this article calls Port Address Translation (PAT), but again as it describes it does not route ICMP so ping will give you no joy.

The way that PAT works is that you can map inbound TCP request to a well known port on the guest to a port on the host. So take the example of SSH this is on port 22, so you can map, say host:2222 to the guest:22 (I am am assuming there that the guest is your asterix server) so if your host is called fred then you can ssh from it to the guestVM by connecting to localhost:2222 and to fred:2222 form any other PC. If you can change the default VoIP port on your VoIP devices then you can use the same trick to connect them to the guest. If the port isn't being used on the host (and its > 1000 in the case of Linux) then you can just directly map it. Search for setextradata in the UG.

The only other option is as you say to use a bridged network but with the current version of VBox this is more complex to set up.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
will65
Posts: 2
Joined: 11. Aug 2008, 00:23

Thank you!!!

Post by will65 »

Thank you Greatly!!!

I read through that article as well as the link to the howstuffworks article as well. I have a better grasp on the situation and have tested the ssh connection with success!!!! I found this article which directly describes what you suggested to get it working (had never touched the setextradata before).
http://herbee.fr/?q=VirtualBox-NAT
I'm not exactly sure about the voip boxes yet as I'll have to do some more reading on the model and redo the config as it's been a while. Thank you again for the quick reply, the links and the information! Have a great day!
Post Reply