Re: channel 3: open failed: connect failed: Connection refused
- From: per@xxxxxxxxxxxx (Per Hedeland)
- Date: Thu, 29 Nov 2007 23:04:55 +0000 (UTC)
In article <m2abp0okcz.fsf@xxxxxxxxxxxxxxxxx> blueman
<NOSPAM@xxxxxxxxxx> writes:
OK. Well, let me explain what I am doing in more detail and maybe
someone can explain what is going wrong.
I am trying to tunnel smb (cifs) over ssh by redireting port 445 over
a non-priveleged port on both ends. On the client end, the command
mount.cifs allows you to specify an arbitrary port and on the server
end I am using iptables to route from the ssh-forwarded non-privileged
port back to port 445 where smbd (the samba server) listens.
Specifically,
1. On the ssh and smb server I am using the "PREROUTING" iptable to
re-route incoming traffice from a non-privileged port (say 1445) to
445, using the following rule:
-A PREROUTING -p tcp --dport 1445 -j DNAT --to 127.0.0.1:445
(My intention is that this should effectively "trick" the smbd
server that it is listening in also on port 1445)
Well, this is straying from the subject of this group, but try the
OUTPUT table instead. PREROUTING is for packets arriving from the
"outside" to the host, and while your packets sort-of are, iptables
knows nothing about that - as far as it can determine (and technically
correct), they are locally originated by the sshd process.
However, there's no point to this iptables thing - just do the ssh
forwarding as -L1445:127.0.0.1:445 instead. You don't need privileges to
connect to a "privileged" port, only to listen on it.
--Per Hedeland
per@xxxxxxxxxxxx
.
- References:
- channel 3: open failed: connect failed: Connection refused
- From: blueman
- Re: channel 3: open failed: connect failed: Connection refused
- From: Per Hedeland
- Re: channel 3: open failed: connect failed: Connection refused
- From: blueman
- channel 3: open failed: connect failed: Connection refused
- Prev by Date: Re: PEM_read_PrivateKey failed - many posts, but few answers.
- Next by Date: Re: How to set these machines ssh without password?
- Previous by thread: Re: channel 3: open failed: connect failed: Connection refused
- Next by thread: sftp quits after logging in
- Index(es):
Relevant Pages
|
|