LinuxQuestions.org
Review your favorite Linux distribution.
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 12-14-2003, 09:28 AM   #1
mastery0da
LQ Newbie
 
Registered: Dec 2003
Posts: 5

Rep: Reputation: 0
SSH clients, Firewalls, Tunneling...Help


Well I asked a question in an earlier thread and it was hardly touched. So maybe I asked the wrong question.

Warning: The proceeding statements are made by a Newb.

I am running Redhat 9 as a server that shares its internet connection with 2 other computers. I rummaged through the internet and found some postings on how to set up the iptables. I have read the HOWTO on IPTABLES...

In an earlier post, I asked questions about tunneling. Now after a day of messing around I think I can narrow my field of choices to a couple of questions.

My goal is to forward port connections on my server, to another computer connected via SSH. In other words, I am at school....fire up securecrt and conenct to the ssh server on my linux box at home. The way I have it set up is so that it SHOULD forward any connections targeted at a specific port to a another named port on the client computer that is connected via ssh.

The frustrating thing is that I can get the reverse to occur. I can ...
target my localhost port and connect to the server. But not the other way around.

Here are my obervations:

1) I notice this switch when i ssh --help
-g Allow remote hosts to connect to forwarded ports.
But I don't know if the clients I am using to connect to the ssh server
are able to set that or if they do normally. Is there a way to make this
always on? I found out about this here:
lists.imeme.net/archives/imeme-users/2003-November/002950.html
2)I noticed that I only have a few ports open. I do a
nmap -sT -O localhost and even after I am connected via ssh with supposed tunneling enabled, I do not see the ports I specified. So I looked up how to supposedly enable them...and came up with:
iptables -I INPUT -p tcp --dport X -j ACCEPT
Where X is supposed to be the port I want enabled. Now is that all I have to do? Or do I need to save the iptables and restart the network to make that take effect? Because if I do that for say port 27960 and the do a netstat -lap I see this:
tcp 0 0 localhost.localdo:27960 *:* LISTEN 7777/sshd

Anyway, my ultimate questions are:

A) How do I allow the remote hosts to connect to a forwarded port.
B) How do I unconditionally open a port of my choosing so that traffic to it can be forwarded to an ssh client.

Please feel free to point me to GOOD tutorials, documents...something I can follow. And don't be afraid to let me know if I am asking the wrong questions.

Thanks for reading this.

Last edited by mastery0da; 12-14-2003 at 09:29 AM.
 
  


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
tunneling thru ssh c9876543210 Linux - Networking 1 07-21-2005 12:45 AM
X tunneling with SSH phekno Linux - Networking 3 05-31-2005 10:43 AM
SSH tunneling X AzZuM Linux - Security 3 11-27-2004 01:59 AM
SSH Tunneling danny_beta_read Linux - Networking 0 06-10-2004 02:43 PM
tunneling with ssh barbanero Linux - Security 2 01-24-2002 10:53 AM

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

All times are GMT -5. The time now is 05:04 AM.

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