You were absolutely right, xinetd did it. If anyone cares to know the
details, here they are:
I wanted to be able to create a tunnel automatically when I connect to
localhost port 1234 to a remote port 25 in order to tunnel through the
office's block on port 25.
1) Create a file in /etc/xinetd.d/ and call it something like tunnel_smtp
The content of the file:
---------- BEGIN tunnel_smtp -----------
service tunnel_smtp
{
type = UNLISTED
port = 1234
socket_type = stream
protocol = tcp
wait = no
user = your_user_name
disable = no
server = /usr/bin/ssh
server_args = remote -T socat - TCP4:mail:25
groups = yes
bind = 127.0.0.1
}
---------- END tunnel_smtp -----------
Replace
Avi Schwartz wrote:
I am looking for a program that will monitor a configurable local port and when an attempt is made to access that port, it will start SSH to tunnel to a remote server and forward this port through the tunnel. I know I can use SSH to do this tunneling but I would like to find a program which will bring up that tunnel on demand.
I think xinetd is what you're looking for. -- Avi Schwartz http://public.xdi.org/=avi.schwartz
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com