--Boundary_(ID_4fTnZfp+IEbkfxsZprVX7Q)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT



Oleg Goldshmidt wrote:

>Hi,
>
>Can anyone point me to a reliable, secure, and easy-to-set-up
>dial-back solution for Linux? I need to dial from a Linux box into
>another Linux box (both Red Hat 7.* if that matters), and have the
>second one hang up and dial me back.
>
>I am pretty sure that it is possible to do this, say, with mgetty
>(alternatives?), but I would much prefer an existing, tested, 
>shrinkwrapped solution to a configuration/scriptwriting effort of 
>my own. Surprisingly, I have not found a solution on the web, not
>even a guide to configuring mgetty for this. Of course, my search
>could have been not thorough enough. Any suggestions?
>
Hi Oleg,

I set up once a Linux RAS machine and wrote down all the steps in case I 
needed it afterwards (which I did :-)). The attached file is HTML and 
should help you setting up the callback server. You will need to write a 
chat script for the linux client (the RAS I set up was for Windows 
clients), but I don't think it should be too hard.

Hope this helps.

Henry


--Boundary_(ID_4fTnZfp+IEbkfxsZprVX7Q)
Content-type: text/html; charset=UTF-8; name=RAS.html
Content-transfer-encoding: 8BIT
Content-disposition: inline; filename=RAS.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
 
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
  <meta name="Generator" content="KWord HTML Export Filter Version = 2.35 ">
  <title>RAS.html</title>
</head>
 <body bgcolor="#ffffff">
 
<p align="Center"><big><big><font face="arial"><b>Remote Access Server 
(RAS)</b></font></big></big></p>
 
<p align="Center"><font face="arial">How to setup a RAS server with Callback
services in Linux</font></p>
 
<p align="Center"><font face="arial"> </font></p>
 
<h1><small><small><font face="monotype-arial">Software 
requirements</font></small></small></h1>
 
<p><font face="monotype-arial">If you haven't already, install the mgetty
package.</font></p>
 
<p><font face="monotype-arial"><b> </b></font></p>
 
<h1><small><small><font face="monotype-arial">Hardware 
requirements</font></small></small></h1>
 
<p><font face="monotype-arial">Use only internal ISA or external modems.
Internal PCI modems are mostly winmodems or softmodems - controler-less modems
designed to work only with Windows<sup> ®</sup>.<sup> </sup>Many winmodems
can work with Linux, but are not recommended because they use CPU cycles
in order to operate.</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<h1><small><small><font face="monotype-arial">Configuration</font></small></small></h1>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">1. Add the following line to /etc/passwd:</font></p>
 
<p><font face="monotype-arial">pppuser:x:50X:50X:PPP 
Dialin:/home/pppuser:/etc/ppp/ppplogin</font></p>
 
<p><font face="monotype-arial">(replace "X" with unused user/group 
combination)</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">2. Edit /etc/ppp/chap-secrets and add the
following:</font></p>
 
<p><font face="monotype-arial">pppuser  *       pppuser_password                
*</font></p>
 
<p><font face="monotype-arial">(Windows 95/98 use chap authentication. For
Windows 2000 and linux workstations use pap-secrets instead)</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">3. Create /etc/ppp/ppplogin with the following
line:</font></p>
 
<p><font face="monotype-arial">exec /usr/sbin/pppd nodetach</font></p>
 
<p><font face="monotype-arial">Make it executable: </font></p>
 
<p><font face="monotype-arial"># chmod +x /etc/ppp/ppplogin</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">4. Edit /etc/ppp/options and add the 
following:</font></p>
 
<p><font face="monotype-arial">netmask 255.255.255.0</font></p>
 
<p><font face="monotype-arial">proxyarp </font></p>
 
<p><font face="monotype-arial">lock </font></p>
 
<p><font face="monotype-arial">crtscts </font></p>
 
<p><font face="monotype-arial">modem </font></p>
 
<p><font face="monotype-arial">asyncmap 0</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">5. Edit the file /etc/inittab and add the
following line (use different lines for different modems):</font></p>
 
<p><font face="monotype-arial">s1:2345:respawn:/sbin/mgetty ttyS1 -D /dev/ttyS1
vt100</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">6. Create the file /etc/ppp/options.ttySX
(where X is 1,2,3, etc. One file for each modem). In it write:</font></p>
 
<p><font face="monotype-arial">IP_local: IP_remote </font></p>
 
<p><font face="monotype-arial">(e.g. 192.168.1.1:192.168.1.2)</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">7. Check /etc/mgetty+sendfax/login.config
and uncomment the line:</font></p>
 
<p><font face="monotype-arial">/AutoPPP/ - a_ppp /usr/sbin/pppd auth -chap
+pap login detach kdebug 7 debug</font></p>
 
<p><font face="monotype-arial">(for chap authentication, use +chap -pap)</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">8. Set up suid for the ppp daemon:</font></p>
 
<p><font face="monotype-arial">chmod u+s /usr/sbin/pppd </font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">9. In RedHat 7.x, check the file /etc/sysctl.conf
and make sure you have:</font></p>
 
<p><font face="monotype-arial">net.ipv4.ip_forward = 1</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">10. Create the file /etc/mgetty+sendfax/callback.config
and leave it empty.</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">11. Edit the file /etc/mgetty+sendfax/login.conf
and add the following:</font></p>
 
<p><font face="monotype-arial">call - - /usr/sbin/callback - S 123456 </font></p>
 
<p><font face="monotype-arial">(call is a pseudo-user, you can put any name
here, just make sure you have one name for each user who will be using callback
services. Replace 123456 whith the user's phone number.)</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">12. Create users as needed (useradd and passwd
user).</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">13. In the Windows' modem configuration screen,
add the string &amp;c0s0=1 in the extra options.</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">14. Use the following script for Windows 
clients:</font></p>
 
<p><font face="monotype-arial">proc main</font></p>
 
<p><font face="monotype-arial">delay 1</font></p>
 
<p><font face="monotype-arial">waitfor "ogin:"</font></p>
 
<p><font face="monotype-arial">transmit "call^M" &lt;== Replace with psudo-users
in /etc/mgetty+sendfax/login.conf</font></p>
 
<p><font face="monotype-arial">waitfor "RING"</font></p>
 
<p><font face="monotype-arial">transmit "ATA^M"</font></p>
 
<p><font face="monotype-arial">waitfor "CONNECT"</font></p>
 
<p><font face="monotype-arial">waitfor "ogin:"</font></p>
 
<p><font face="monotype-arial">transmit "user^M" &lt;== Replace with real
user</font></p>
 
<p><font face="monotype-arial">waitfor "word:"</font></p>
 
<p><font face="monotype-arial">transmit "userpassword^M"</font></p>
 
<p><font face="monotype-arial">waitfor "$"</font></p>
 
<p><font face="monotype-arial">transmit "/usr/sbin/pppd^M"</font></p>
 
<p><font face="monotype-arial">endproc</font></p>
 
<p><font face="monotype-arial"> </font></p>
 
<p><font face="monotype-arial">15. Check system.</font></p>
 
</body>
</html>

--Boundary_(ID_4fTnZfp+IEbkfxsZprVX7Q)--

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to