Page 1 of 1

tcp and udp for port forwarding

Posted: 15. Sep 2009, 20:44
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?

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 21:09
by vbox4me2
Read the Manual about port forwarding, its in there.

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 21:19
by cankoy
I read everything in 6.4 of manual. Is there somewhere else I need to look at?

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 21:24
by vbox4me2
Hit the search button in acrobat and type "port forward", the chapter lists tcp/udp examples.

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 21:34
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?

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 21:46
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 3504 times

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 22:09
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)

Re: tcp and udp for port forwarding

Posted: 15. Sep 2009, 22:16
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.

Re: tcp and udp for port forwarding

Posted: 17. Sep 2009, 10:13
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)