The VPN HOWTO : Doing it by hand.

Next Previous Contents

## 6. Doing it by hand.

## 6.1 Logging in

You've already tried if ssh works well, aren't you? If the slave refuses to log you in, read the logs. Perhaps there are problems with file permissions or the sshd setup.

## 6.2 Firing up ppp

Log in into slave, and issue:

    sudo /usr/sbin/pppd passive

You should see garbage coming at this point. If it works good, if not, there is some problem either with sudo, either with pppd. Look what the commands had said, and at the logs and at the /etc/ppp/options, and the .ppprc file. If it works, write this 'passive' word into .ppprc, and try again. To get rid off the garbage and continue working, press enter,'~' and '^Z'. You should have the master's prompt now, and kill %1. See the section about tuning if you want to know more of the escape character.

## 6.3 Together the two

Well, then

    ssh -l slave polanski sudo /usr/sbin/pppd

should work also, and deliver the garbage right into your face.

## 6.4 Pty redirecting

Try to redirect this whole thing this time:

    /usr/local/bin/pty-redir /usr/bin/ssh -l slave polanski sudo /usr/sbin/pppd

Nice long sentence isn't it? You should use the full path into the ssh executable, as the pty-redir program allows only this form for security reasons. Now you've got a device name from the program. Let's say, you've got /dev/ttyp0 You can use the ps command to look what has happened. Look for 'p0'

## 6.5 Is anything on the device?

Try

    /usr/sbin/pppd /dev/ttyp0 local 192.168.0.1:192.168.0.2

to establish the connection. Look at the output of the ifconfig command to see if the device has established, and use ping to check your virtual net.

## 6.6 Setting up the routes

Set up the routes on the master host, and on the slave also. Now you should be able to ping one host in one intranet from other host in the other intranet. Set up the additional firewalling rules. Now as you have the VPN, you can set up the rules concerning the connectivity of the two intranets.

Next Previous Contents