Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.