FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-11-2012, 08:53 AM
houkensjtu
 
Default More on port forwarding(ssh, netcat and amule!)

Hi debianer!

I post a question about port forwarding yesterday and got quick reply, big thanks!
Now I still have sth. not clear and it can be described as:

I have a laptop in my home, which is connected to my router. Yesterday, I succeeded in open a ssh port(22) on router, and start ssh server on my laptop. Now I can access my laptop from office by ssh USER@my_home_external_ip.

Also, scan port by using netcat from office:
nc -vz my_home_external_ip 22
gives me:
Connection to my_home_external_ip port [tcp/ssh] succeeded!

Today, I tried to open another port on my router, let me call it 1234. And I set amule on my laptop to use port 1234 for both tcp and udp. Fortunatelly, I got a High ID as expected.

And then I got confused.
I tried to scan port 1234 from my office:
nc -vz my_home_external_ip 1234
it says:
nc: connect to my_home_external_ip port 1234 (tcp) failed: Connection refused

However, after I remote access my laptop, launch amule on it, netcat now can:
Connection to my_home_external_ip 1234 port [tcp/*] succeeded!

It seems that, not only on the router, but also I should open a specific port on my laptop, otherwise netcat will not be able to connect from outside my home.

I wonder why this happens and what is the mechanism behind it.
Is it possible to open a port in debian, without launch certain software so I can netcat from outside to my home laptop?

Thanks!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1ba8a1d0-b205-42a1-a9a3-393852fe4d59@googlegroups.com">http://lists.debian.org/1ba8a1d0-b205-42a1-a9a3-393852fe4d59@googlegroups.com
 
Old 10-11-2012, 09:21 AM
Tom Grace
 
Default More on port forwarding(ssh, netcat and amule!)

On 11/10/12 09:53, houkensjtu wrote:
> It seems that, not only on the router, but also I should open a specific port on my laptop, otherwise netcat will not be able to connect from outside my home.
>
> I wonder why this happens and what is the mechanism behind it.
> Is it possible to open a port in debian, without launch certain software so I can netcat from outside to my home laptop?

You can have the port open in firewall terms, but if you don't have any
software listening on it you will receive "connection refused".




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 50768F92.3000204@deathbycomputers.co.uk">http://lists.debian.org/50768F92.3000204@deathbycomputers.co.uk
 
Old 10-11-2012, 09:26 AM
Pietro Paolini
 
Default More on port forwarding(ssh, netcat and amule!)

Hello,

A port number identifies a process running in your machine, then is implicit that a process must be running and listening on that port. When your netcat try to connect it will probably receives an ICMP packet advertising the "Connection Refused" or an TCP segment with the flags RST set on.

Hope this can help you.

Pietro.



-----Original Message-----
From: robomod@news.nic.it [mailto:robomod@news.nic.it] On Behalf Of houkensjtu
Sent: giovedě 11 ottobre 2012 10:53
To: debian-user@lists.debian.org
Subject: More on port forwarding(ssh, netcat and amule!)

Hi debianer!

I post a question about port forwarding yesterday and got quick reply, big thanks!
Now I still have sth. not clear and it can be described as:

I have a laptop in my home, which is connected to my router. Yesterday, I succeeded in open a ssh port(22) on router, and start ssh server on my laptop. Now I can access my laptop from office by ssh USER@my_home_external_ip.

Also, scan port by using netcat from office:
nc -vz my_home_external_ip 22
gives me:
Connection to my_home_external_ip port [tcp/ssh] succeeded!

Today, I tried to open another port on my router, let me call it 1234. And I set amule on my laptop to use port 1234 for both tcp and udp. Fortunatelly, I got a High ID as expected.

And then I got confused.
I tried to scan port 1234 from my office:
nc -vz my_home_external_ip 1234
it says:
nc: connect to my_home_external_ip port 1234 (tcp) failed: Connection refused

However, after I remote access my laptop, launch amule on it, netcat now can:
Connection to my_home_external_ip 1234 port [tcp/*] succeeded!

It seems that, not only on the router, but also I should open a specific port on my laptop, otherwise netcat will not be able to connect from outside my home.

I wonder why this happens and what is the mechanism behind it.
Is it possible to open a port in debian, without launch certain software so I can netcat from outside to my home laptop?

Thanks!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/1ba8a1d0-b205-42a1-a9a3-393852fe4d59@googlegroups.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 56AB56EAD87AF24C803FB693654D7A89C87D4A@adbbexch01. adbitaly.com">http://lists.debian.org/56AB56EAD87AF24C803FB693654D7A89C87D4A@adbbexch01. adbitaly.com
 

Thread Tools




All times are GMT. The time now is 01:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org