tcp and udp for port forwarding

Discussions related to using VirtualBox on Windows hosts.
Post Reply
cankoy
Posts: 6
Joined: 26. Jun 2009, 19:56
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux,freebsd

tcp and udp for port forwarding

Post by cankoy »

Linux guest is running a DNS server, which I want to make available to rest of network using port forwarding function of NAT.
I need to specify both tcp and udp for the same port (53). Is this possible?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: tcp and udp for port forwarding

Post by vbox4me2 »

Read the Manual about port forwarding, its in there.
cankoy
Posts: 6
Joined: 26. Jun 2009, 19:56
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux,freebsd

Re: tcp and udp for port forwarding

Post by cankoy »

I read everything in 6.4 of manual. Is there somewhere else I need to look at?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: tcp and udp for port forwarding

Post by vbox4me2 »

Hit the search button in acrobat and type "port forward", the chapter lists tcp/udp examples.
cankoy
Posts: 6
Joined: 26. Jun 2009, 19:56
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux,freebsd

Re: tcp and udp for port forwarding

Post by cankoy »

vbox4me2 wrote:Hit the search button in acrobat and type "port forward", the chapter lists tcp/udp examples.
Either you're not reading what I type or I'm stupid. Let's assume it's the latter.
So, can you give the exact section number in manual which gives the example of port forwarding for both tcp and udp?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: tcp and udp for port forwarding

Post by vbox4me2 »

In the 2.2.4 manual its under "6.4.1 Con?guring port forwarding with NAT"
untitled1.jpg
untitled1.jpg (85.48 KiB) Viewed 3503 times
cankoy
Posts: 6
Joined: 26. Jun 2009, 19:56
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux,freebsd

Re: tcp and udp for port forwarding

Post by cankoy »

vbox4me2 wrote:In the 2.2.4 manual its under "6.4.1 Con?guring port forwarding with NAT"
Apparently, you have no idea what my question is about. :|

If you still insist you know, then could you be kind enough to show me how to specify BOTH tcp and udp for that 2222-to-22 port forwarding? (fyi, that example is only for tcp)
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: tcp and udp for port forwarding

Post by vbox4me2 »

Apparently you need to get your school fee's back... read that snippet again, at the last line it says UDP and TCP are supported and yes you can add forward lines until you run out of diskspace.
svenfranzisko
Posts: 1
Joined: 17. Sep 2009, 10:02
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MS Windows XP

Re: tcp and udp for port forwarding

Post by svenfranzisko »

If you want to add a new forwarding configuration you have to choose another config name.
In this example:

VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222

is guestssh the config name.

Enter for an additional UDP config:

VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestsshUDP/Protocol" UDP
VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestsshUDP/GuestPort" 22
VBoxManage setextradata "Linux Guest" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestsshUDP/HostPort" 2222

The config name guestsshUDP is arbitrary.

Check the success of your setup after starting of the guest machine in your logfile (%USERPROFILE%\.VirtualBox\Machines\WINDOWSXP01\Logs\VBox.log).

It should look similar like this:

00:00:03.130 [/Devices/pcnet/0/LUN#0/Config/guestssh/] (level 6)
00:00:03.130 Protocol <string> = "TCP" (cch=4)
00:00:03.130 GuestPort <integer> = 0x0000000000000327 (22)
00:00:03.130 HostPort <integer> = 0x0000000000000327 (2222)
00:00:03.130
00:00:03.130 [/Devices/pcnet/0/LUN#0/Config/guestsshUDP/] (level 6)
00:00:03.130 Protocol <string> = "UDP" (cch=4)
00:00:03.130 GuestPort <integer> = 0x0000000000000327 (22)
00:00:03.130 HostPort <integer> = 0x0000000000000327 (2222)
Post Reply