Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 1999 14:13:01 -0500 (EST)
From:      Joe Orthoefer <orthoefe@gte.net>
To:        David Opalecky <opalecky@ns1.global-av.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ppp over ssh
Message-ID:  <Pine.BSF.3.96.990210133846.393A-100000@localhost>
In-Reply-To: <36C0BD6E.FB89211F@mail.global-av.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Use the user mode ppp if both ends are FreeBSD boxes. __The rest of these
instructions assume that this is the case.__

Spend some time getting a ppp session working over TCP, there should be
explicit instructions for that either in the ppp man page or
/etc/ppp/ppp.conf.  This should involve setting up ppp.conf on the client
and server ends, and modifying inet.conf on the remote end.  You'll
probably need to tweak the keepalive values in /etc/ppp/ppp.conf also.
Turning on ppp logging lets you see what's going on.  There are a couple
of knobs for this in /etc/ppp/ppp.conf as well as /etc/syslog.conf.  Also
once this is working learn the routing you need to make this work if you
intend on connecting two networks via this ppp tunnel. 

Once you have that working go ahead and learn to use the TCP port
forwarding features of ssh.  A good way to learn this is to do something
like "ssh remote-machine -L 8000:127.0.0.1:23", then on the local machine
also do "telnet 127.0.0.1 8000".  You'll need multiple shells open to play
with this.  

Modify the working ppp.conf for your local end so it tries to connect to
localhost on some port #.  Start secure shell with forwarding from that
local port number to the port number inetd on the remote machine is
litening to for ppp over tcp connections.  Experiment.  You'll need
multiple shells open on the local machine to do this.

Finally try to use a shell script for driving these operations.  You'll
need to set up the remote machine to allow a secure shell session from a
particular user on your machine to login without a password.  Ssh needs to
be run in the background, redirecting output to /dev/null.  You'll need to
send the remote end a "sleep" shell command to keep the ssh session open
long enough for ppp to get started. 

"ssh -n -l pppuser -L 8000:127.0.0.1:8000 sleep 30 > /dev/null &"

If you get all of that working you'll want to tweek the mru/mtu values on
both ends of the ppp tunnel, these values will depend on whether you're
looking for interactive or bulk throughput. 


Finally, if you're running 3.0R on both machines you may want to look into
using the KAME Project's IPSEC for IPv4 that has been ported.  I'm unaware
of what documentation for this is available. 

Good luck,

On Tue, 9 Feb 1999, David Opalecky wrote:

> Hello all,
> 
> I'm trying to set up a ppp connection using ssh and not having much
> luck.  The connection refuses to establish when I try to automate the
> ssh login.  The ssh session will establish, then close in about a second
> and a half.  Has anyone messed with this under FreeBSD?  I've basically
> had to try and adapt the Linux HOWTO off the web to 2.2.7 and it no
> workee. Any suggestions would be greatly appreciated.
> DEO
> -- 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> David Opalecky                    
> opalecky@global-av.com                
> (214) 755-6875   (972) 939-3754        
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990210133846.393A-100000>