LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-09-2009, 12:14 PM   #1
jcafaro10
LQ Newbie
 
Registered: Apr 2009
Posts: 25

Rep: Reputation: 15
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,
 
Old 04-09-2009, 12:55 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
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.
 
Old 04-09-2009, 06:06 PM   #3
jcafaro10
LQ Newbie
 
Registered: Apr 2009
Posts: 25

Original Poster
Rep: Reputation: 15
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
 
Old 04-09-2009, 06:28 PM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
beginner level LINUX questions required anjan.goswami Linux - Newbie 5 10-15-2008 05:57 AM
Beginner questions phantom_cyph Solaris / OpenSolaris 16 06-08-2007 03:51 PM
Any good books on linux networking for a beginner? (re: OpenWRT) sofakng Linux - Networking 1 04-26-2005 12:18 AM
Beginner networking: sharing a drive LancerNZ Linux - Networking 3 02-25-2005 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration