Telnetd is considered bad practice these days. Don't use it, don't run the daemon on your system. Use sshd instead. Spend your time learning about a secure way of connecting to your system instead of something that makes your server vulnerable by design.
–
jippieJun 11 '12 at 21:01

Or you can leave it to NAT, but you have to click on the Port Forwarding button and Set a new rule, you name it "telnet", protocol should be "TCP", leave the fileds Hos and Guest IP empty, but set the Host and Guest Port to 23.
–
HuygensJun 11 '12 at 15:16

@Huygens, +1 you are correct, but I think for OP is probably more easy to setup it this way.You can also post this as answer.
–
rkosegiJun 11 '12 at 15:42

1

It is a bridged adapter (as was discussed in the comments). But selecting the correct adapter might help.
–
lgarzoJun 11 '12 at 15:58

Thank you for your answer. So regarding the first point, I do have Bridged Adapter configured. I've configured the "Microsoft Loopback Adapter", as you proposed (I had to install it on my Windows first). But then, after I restarted the virtual machine, I was not able to reach the PC from the VM and vice versa.
–
Eugene SJun 12 '12 at 6:30

@EugeneS : you need to configure IP of MS Virtual Loopback adapter to something from same subnet as your VM has.Eg if your VM is 192.168.0.5 and netmak is 255.255.255.0 then set IP of virtual loopback adapter to 192.168.0.1 (or similar).
–
rkosegiJun 12 '12 at 6:37

And select the Windows network interface that is configured under Windows to have network access.

Make sure you have no firewall on Ubuntu: sudo iptables -L should give you no rules.

2- Use "NAT" with port-forwarding

Select NAT and unflod the advanced settings of the NAT interface in VirtualBox settings. Then you click on the Port Forwarding button and create a new rule, you name it "telnet" (or whatever you prefer), protocol should be "TCP", leave the fields Host and Guest IP empty, but set the Host and Guest Port to 23.

Check the external IP address of the VM to access it. This IP address is the same one as for the VirtualBox Host-only network, you can check the IP in Windows networking center by clicking on the interface and displaying its status/details. Or you can check in VirtualBox preferences (not the VM Settings, but the VirtualBox preferences) under network, check the IP address of the Host-only ethernet adpater (click on the Edit button of this interface).

Make sure you have no firewall on Ubuntu: sudo iptables -L should give you no rules.

B. Your Windows host has no network

Use "Host-only" networking. Nothing else to configure.

The IP address to use is the one given in Ubuntu when you run ifconfig.

Make sure you have no firewall on Ubuntu: sudo iptables -L should give you no rules.

Thank you for your detailed answer! So since I have my Windows host connected to the network I used the first option, which is using Bridged Connection. I chose the "Broadcom NetXtreme 57xx Gigabit Controller" which is an actual physical controller installed on the PC. I've also checked that there are no firewall configured in Ubuntu. After starting the machine I got the exact condition I had from the very beginning.. I can ping both ways inside the network (I have few Linuxes in the network). I can ssh to all these from Ubuntu. The only problem is that I cannot ssh TO this Ubuntu system.
–
Eugene SJun 12 '12 at 13:31

When you are on one of your Linux boxes, what does ssh tells you when you ask it to be verbose? Like with ssh -v <USER VM>@<IP VM>? And you confirm that from another Linux boxes you can ping <IP VM> and it is working? What about sudo nmap -A <IP VM> (not using localhost, but really being from another Linux machine and entering the IP address of the VM)?
–
HuygensJun 12 '12 at 14:00

Verbose output of the ssh give only the following: OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 10.125.31.176 [10.125.31.176] port 22. I afraid it will be impossible to nmap from another machine since the rest of them are Red Hats with no nmap on them..
–
Eugene SJun 12 '12 at 14:15

I've just noticed that I can telnet AND ssh to that Ubuntu system from Windows(on which the VB is running) and the connection succeeded! However I still can't ssh to that Ubuntu from any other Linux system. This is really getting strange for me..
–
Eugene SJun 12 '12 at 14:21

If you have Red Hat CD/DVD or subscription and administrative rights, then you could install nmap on these machines, it is just not part of the default Red Hat installation. However, if you can telnet from Windows to VM but not from an external system to VM while in bridge networking, then there is a firewall of some sort on your windows box that is blocking the network stream.
–
HuygensJun 12 '12 at 14:26