LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux networking beginner questions (https://www.linuxquestions.org/questions/linux-networking-3/linux-networking-beginner-questions-717993/)

jcafaro10 04-09-2009 12:14 PM

Linux networking beginner questions
 
I'm new to Linux but I'm messing around with my Ubuntu installations trying to figure out cool things that I can do with them. I'm running two virtual machines of Ubuntu on the same network. I'd like to be able to send commands from one machine to the other machine. There's a couple of things that I'd like to know how to do.

Firstly, how can I see what ports are open on one of the machines from the other one? I can open up a port on one machine, how can I see that that port is open from another machine? I know there are commands like telnet,netcat, that I've read about but they all seem to do a whole lot of things that I don't really understand.

Secondly, if I want to send a command from one machine to another, I assume I need to have a terminal/shell that connects to a terminal/shell on the other machine. If I want to send a command from A to B, and I open a port on B, can I link that port on B to a terminal/shell? How on machine A then do I talk to that shell?

Thanks,

camorri 04-09-2009 12:55 PM

Quote:

Firstly, how can I see what ports are open on one of the machines from the other one?
On your Ubuntu ( linux ) machine install Nmap. It will scan ports. I tried it on winblows XP without a firewall running. A "quick scan" scanned 1000 ports, 4 were open. It tells you the open port number, and the well know use of that port.

Quote:

Secondly, if I want to send a command from one machine to another, I assume I need to have a terminal/shell that connects to a terminal/shell on the other machine.
You can use ssh to connect to a remote machine and issue commands. Openssh and Putty are both available for windows. With Open SSH you should be able to set up keys, and connect securely without passwords.

jcafaro10 04-09-2009 06:06 PM

I ran some sample server code on one of my VM's to make an http server, then sent a request from my other VM, intended to overflow a buffer and bind a port to a shell. I can verify that the port was bound to the shell on my server VM but as soon as I try and connect to that port, the port closes. Does Ubuntu maybe have anything built in that would cause this? I'm not familiar with Linux networking so maybe there's something that closes the por tautomatically

camorri 04-09-2009 06:28 PM

Quote:

Does Ubuntu maybe have anything built in that would cause this?
I don't run Ubuntu any more, I know some distros do have security settings. I'm running Mandriva, and it has security settings that affect a lot of things.

Sorry I can not give you an answer on Ubuntu.


All times are GMT -5. The time now is 05:37 PM.