LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-02-2008, 11:17 AM   #1
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Rep: Reputation: 0
Question SSH Tunnels - Connection Refused


Having trouble getting an SSH tunnel to connect to my Slackware 12.0 box.

Here's my setup:

- EXTERNAL_BOX: putty to SLACKWARE_12:SSH_PORT, tunnel 1111 (local) to SLACKWARE_12:FORWARDING_PORT
- ROUTER: forwards port SSH_PORT to SLACKWARE_12 (which I can log in fine) and forwards FORWARDING_PORT to SLACKWARE_12
- SLACKWARE_12:
...sshd_conf:
Code:
AllowTcpForwarding yes
...firewall: allows the FORWARDING_PORT

Now I've tried it behind the router with the same results: Connection refused.

I don't know if it is sshd stopping the tunnel or what. inetd?

I'll try a local tunnel to see if I can at least do that.

Thanks.

Last edited by pricejm; 01-02-2008 at 11:18 AM.
 
Old 01-02-2008, 02:26 PM   #2
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
This might help. Depending on what you're trying to tunnel, you could use SSH as a socks proxy.

http://tipotheday.com/2007/12/16/bor...r-connections/
 
Old 01-06-2008, 08:16 PM   #3
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
Unhappy

I'll have to try the SSH and SOCKS out...

So I can do this:

# ssh -L 2001:localhost:25 localhost

then in that session I can telnet to localhost 2001 and get my smtp...

So I still don't know why it want let any external sessions.

If I add a "PermitOpen 192.168.1.100:7838" to the sshd_config I'll get the error message in Putty: Forwarded connection refused by server: Administratively prohibited [open failed]

Something's changing for sure.

If I had the "PermitOpen any" I get the connection refused again.

The ports are open through the firewall, unless I'm screwing that up (I'm getting different responses, so I'd think I have the firewall right though).

I'm totally baffled at this point.
 
Old 01-07-2008, 03:32 AM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Disable firewall for now.
 
Old 01-07-2008, 10:33 AM   #5
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
I set the firewall to accept all by default.

Something I thought was interesting:

...
sshd[12657]: debug1: server_request_direct_tcpip: originator 0.0.0.0 port 0, target server.com port 7777
...

When it works from my router, i.e. ssh -L 2000:server:25 or whatever, I get:
sshd[12550]: debug1: server_request_direct_tcpip: originator 127.0.0.1 port 59556, target server.com port 25

So maybe figuring out why I'm not getting an originating IP might fix me.
 
Old 01-07-2008, 10:55 AM   #6
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
Lightbulb Finally

OK. I might be an idiot, but this seemed to fix it:

The hostname has always been domain-serv, since I always thought of my router as being domain.com...so after running `hostname domain.com`...bam! It finally works...

I guess sometimes it is too simple. sshd had to be resolving domain.com to my router, ergo the connection failed.

I spent a couple weeks on this just for one command to fix it...but I learned much in the process.

Now I'm only a Level 2 idiot.

Last edited by pricejm; 01-07-2008 at 10:57 AM.
 
  


Reply

Tags
ssh, connection, sshd, forwarding, tcp, refused, tunnel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SSH - Connection Refused eminence Linux - Networking 14 03-06-2012 12:22 AM
SSH Connection Refused? lowpro2k3 Linux - Networking 2 11-04-2009 11:02 AM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
SSH connection refused theoneandonly19 Red Hat 1 07-01-2007 02:48 AM
SSH Connection Refused meping Linux - Networking 9 04-15-2006 01:04 AM


All times are GMT -5. The time now is 03:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration