Slackware This Forum is for the discussion of Slackware Linux.
|
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-02-2008, 11:17 AM
|
#1
|
|
LQ Newbie
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17
Rep:
|
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.
|
|
|
|
01-02-2008, 02:26 PM
|
#2
|
|
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Rep:
|
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/
|
|
|
|
01-06-2008, 08:16 PM
|
#3
|
|
LQ Newbie
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
|
01-07-2008, 03:32 AM
|
#4
|
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Disable firewall for now.
|
|
|
|
01-07-2008, 10:33 AM
|
#5
|
|
LQ Newbie
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
|
01-07-2008, 10:55 AM
|
#6
|
|
LQ Newbie
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|