* Full featured Win95 dialup to Linux
@ 1996-01-07 5:00 Christoph Lameter
1996-01-09 5:00 ` Terry Tanski
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 1996-01-07 5:00 UTC (permalink / raw)
-----BEGIN PGP SIGNED MESSAGE-----
Short Guide on How to run a Win95 Connection with PPPD
- ------------------------------------------------------
1. Do not mess around with the Win95 configuration.
Do not manually configure DNS, Scripts etc.
Do not switch on the terminal windows.
Accept all defaults or better leave it as
it was at installation.
2. You need to have a getty program that supports
automatic PPP protocol detection such as mgetty-0.99.
Mgetty is available from
hpsystem2.informatik.tu-muenchen.de:
/pub/comp/networking/communication/modem/mgetty
Install mgetty and enable the following line in
/usr/local/etc/mgetty+sendfax/login.config:
# Automatic PPP startup on receipt of LCP configure request.
# mgetty has to be compiled with "-DAUTO_PPP" for this to work.
# Warning: Case is significant, AUTOPPP or autoppp won't work!
#
/AutoPPP/ - - /usr/sbin/pppd auth -chap +pap login passive
3. Configure PPP on Linux
A) Add a line
dns-addr 192.168.1.1
to your /etc/ppp/options file. Be sure to replace
192.168.1.1 with a valid Name Server IP Address.
B) Make sure that your /etc/ppp/pap-secrets file is set
up correctly. It should allow your users in /etc/passwd
to establish ppp connections without a password. pppd will
check against passwords in /etc/passwd!
If you are having trouble with authentication then remove
/etc/ppp/pap-secrets completely and it will usually work.
4. Configure Win95
Click on Dialup-Connection
A. Enter phone number of your linux server
B. Enter username when prompted
C. Enter password when prompted
Win95 should connect to your Linux PPPD without problems and automatically
configure all IP-Addresses, Netmasks and DNS Servers. You can immediately
start Netscape, Internet Explorer or any other TCP/IP tools.
Christoph Lameter, Jan 3, 1995 (clameter@fuller.edu)
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
iQCVAwUBMPAaW4QRll5MupLRAQFvYwP9FACdUOpw+xXRanmrA60WXcPiKkFTaAeS
hA5QVGsXg5aPgdqjLZW1sF1vPuSbFxQ/xLgfiFjKEjHDyCKMpRHy6zqoVfREu/II
leEe+wIl1EnIBquuc3OdrelYOA7xJNhiX93FPhK3UbU0k9m45ULMMaESDT+28tEv
iF3id5l8p7w=
=Al6c
-----END PGP SIGNATURE-----
--
This article has been digitally signed by the moderator, using PGP.
Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Full featured Win95 dialup to Linux
1996-01-07 5:00 Full featured Win95 dialup to Linux Christoph Lameter
@ 1996-01-09 5:00 ` Terry Tanski
0 siblings, 0 replies; 2+ messages in thread
From: Terry Tanski @ 1996-01-09 5:00 UTC (permalink / raw)
-----BEGIN PGP SIGNED MESSAGE-----
Christoph Lameter (clameter@fuller.edu) wrote:
> Short Guide on How to run a Win95 Connection with PPPD
> - ------------------------------------------------------
[stuff deleted]
Hi,
For additional functionality, apply the following patch to
pppd-2.2.0d which will add the ability to autoconfigure WINS server
addresses.
Christoph's 3A instruction should then include:
Add a line
wins-addr x.x.x.x
to your /etc/ppp/options file. Be sure to replace x.x.x.x with a
valid WINS server address.
P.S. The wins patch was posted to comp.protocols.smb
by John Paul Morrison, jmorriso@ConcordPacific.com
- ---Cut here---
diff -ur ppp-2.2.0d.old/pppd/Makefile.linux ppp-2.2.0d/pppd/Makefile.linux
- --- ppp-2.2.0d.old/pppd/Makefile.linux Wed Dec 13 20:18:18 1995
+++ ppp-2.2.0d/pppd/Makefile.linux Sun Dec 24 16:53:23 1995
@@ -23,9 +23,10 @@
# CC = gcc
# DEBUG_FLAGS = -DDEBUGALL
COMPILE_FLAGS = -D_linux_=1 -DHAVE_PATHS_H
- -COPTS = -g # -O2
+COPTS = -O2
VER = 0.2.8
LIBS = -lbsd
+USE_MS_DNS = 1
CFLAGS= $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS)
SOURCE= RELNOTES Makefile.linux $(PPPDSRCS) $(HEADERS) $(MANPAGES)
diff -ur ppp-2.2.0d.old/pppd/ipcp.c ppp-2.2.0d/pppd/ipcp.c
- --- ppp-2.2.0d.old/pppd/ipcp.c Thu Nov 23 16:00:37 1995
+++ ppp-2.2.0d/pppd/ipcp.c Tue Dec 26 02:50:32 1995
@@ -137,6 +137,8 @@
#ifdef USE_MS_DNS
wo->dnsaddr[0] =
wo->dnsaddr[1] = 0;
+ wo->winsaddr[0] =
+ wo->winsaddr[1] = 0;
#endif
wo->neg_vj = 1;
@@ -888,6 +890,24 @@
}
break;
+ case CI_MS_WINS1:
+ IPCPDEBUG((LOG_INFO, "ipcp: received WINS Request "));
+
+ /* If we do not have a WINS address then we cannot send it */
+ if (wo->winsaddr[0] == 0 ||
+ cilen != CILEN_ADDR) { /* Check CI length */
+ orc = CONFREJ; /* Reject CI */
+ break;
+ }
+ GETLONG(tl,p);
+ if (htonl(tl) != wo->winsaddr[0]) {
+ DECPTR(sizeof (long),p);
+ tl = ntohl(wo->winsaddr[0]);
+ PUTLONG(tl, p);
+ orc = CONFNAK;
+ }
+ break;
+
case CI_MS_DNS2:
IPCPDEBUG((LOG_INFO, "ipcp: received DNS Request "));
@@ -901,6 +921,24 @@
if (htonl(tl) != wo->dnsaddr[1]) { /* and this is the 2nd one */
DECPTR(sizeof (long),p);
tl = ntohl(wo->dnsaddr[1]);
+ PUTLONG(tl, p);
+ orc = CONFNAK;
+ }
+ break;
+
+ case CI_MS_WINS2:
+ IPCPDEBUG((LOG_INFO, "ipcp: received WINS Request "));
+
+ /* If we do not have a WINS address then we cannot send it */
+ if (wo->winsaddr[0] == 0 || /* Yes, this is the first one! */
+ cilen != CILEN_ADDR) { /* Check CI length */
+ orc = CONFREJ; /* Reject CI */
+ break;
+ }
+ GETLONG(tl,p);
+ if (htonl(tl) != wo->winsaddr[1]) { /* and this is the 2nd one */
+ DECPTR(sizeof (long),p);
+ tl = ntohl(wo->winsaddr[1]);
PUTLONG(tl, p);
orc = CONFNAK;
}
diff -ur ppp-2.2.0d.old/pppd/ipcp.h ppp-2.2.0d/pppd/ipcp.h
- --- ppp-2.2.0d.old/pppd/ipcp.h Thu Nov 23 16:01:55 1995
+++ ppp-2.2.0d/pppd/ipcp.h Tue Dec 26 02:35:44 1995
@@ -27,7 +27,9 @@
#define CI_ADDR 3
#define CI_MS_DNS1 129 /* Primary DNS value */
+#define CI_MS_WINS1 130 /* Primary WINS value */
#define CI_MS_DNS2 131 /* Secondary DNS value */
+#define CI_MS_WINS2 132 /* Secondary WINS value */
#define MAX_STATES 16 /* from slcompress.h */
@@ -55,6 +57,7 @@
u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
#ifdef USE_MS_DNS
u_int32_t dnsaddr[2]; /* Primary and secondary DNS entries */
+ u_int32_t winsaddr[2]; /* Primary and secondary WINS entries */
#endif
} ipcp_options;
diff -ur ppp-2.2.0d.old/pppd/options.c ppp-2.2.0d/pppd/options.c
- --- ppp-2.2.0d.old/pppd/options.c Thu Nov 23 16:00:35 1995
+++ ppp-2.2.0d/pppd/options.c Tue Dec 26 02:52:48 1995
@@ -201,6 +201,7 @@
#ifdef USE_MS_DNS
static int setdnsaddr __P((char **));
+static int setwinsaddr __P((char **));
#endif
static int number_option __P((char *, u_int32_t *, int));
@@ -318,6 +319,7 @@
#ifdef USE_MS_DNS
{"dns-addr", 1, setdnsaddr}, /* DNS address(es) for the peer's use */
+ {"wins-addr", 1, setwinsaddr}, /* WINS address(es) for the peer's use */
#endif
{NULL, 0, NULL}
@@ -2036,4 +2038,32 @@
return (1);
}
+
+/*
+ * setwinsaddr - set the wins address(es)
+ */
+
+static int
+setwinsaddr(argv)
+ char **argv;
+{
+ u_long wins;
+
+ wins = inet_addr(*argv);
+ if (wins == -1) {
+ fprintf(stderr, "Invalid WINS Address %s\n", *argv);
+ return 0;
+ }
+
+ if (ipcp_wantoptions[0].winsaddr[0] == 0) {
+ ipcp_wantoptions[0].winsaddr[0] = wins;
+ ipcp_allowoptions[0].winsaddr[0] = wins;
+ } else {
+ ipcp_wantoptions[0].winsaddr[1] = wins;
+ ipcp_allowoptions[0].winsaddr[1] = wins;
+ }
+
+ return (1);
+ }
+
#endif /* USE_MS_DNS */
diff -ur ppp-2.2.0d.old/pppd/sys-linux.c ppp-2.2.0d/pppd/sys-linux.c
- --- ppp-2.2.0d.old/pppd/sys-linux.c Wed Nov 22 05:51:41 1995
+++ ppp-2.2.0d/pppd/sys-linux.c Tue Dec 26 13:38:13 1995
@@ -1661,7 +1661,7 @@
* This code is derived from chat.c.
*/
- -#define LOCK_PREFIX "/var/lock/LCK.."
+#define LOCK_PREFIX "/var/spool/uucp/LCK.."
/*
* lock - create a lock file for the named device
@@ -1695,8 +1695,13 @@
fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644);
if (fd >= 0)
{
+#ifdef PIDSTRING
sprintf(hdb_lock_buffer, "%010d\n", getpid());
write(fd, hdb_lock_buffer, 11);
+#else
+ pid = getpid();
+ write(fd, &pid, sizeof(pid));
+#endif
close(fd);
return 0;
}
@@ -1716,7 +1721,11 @@
}
/* Read the lock file to find out who has the device locked */
+#ifdef PIDSTRING
n = read (fd, hdb_lock_buffer, 11);
+#else
+ n = read (fd, &pid, sizeof(pid));
+#endif
close (fd);
if (n < 0)
{
@@ -1727,8 +1736,10 @@
/* See the process still exists. */
if (n > 0)
{
+#ifdef PIDSTRING
hdb_lock_buffer[n] = '\0';
sscanf (hdb_lock_buffer, " %d", &pid);
+#endif
if (kill(pid, 0) == -1 && errno == ESRCH)
{
n = 0;
Terry
- --
********* Terry Tanski, B.Sc.
**********
. **** Computing Services Phone: (403) 675-6339
.. **** Athabasca University FAX: (403) 675-6333
.... **** Box 10,000 Email: terryt@cs.athabascau.ca
..........**** Athabasca, AB CANADA Web: http://www.athabascau.ca
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
iQCVAwUBMPLFYoQRll5MupLRAQHSnQP6Ayd1YLR/ieKoVU2FeOVFZ/MvaPdXRThL
fqvD+W/mzV2AGUvaqBNy76R3EeccoseRp7c6E2aWaJlVBQv4pjDfj9KV4H0An8GZ
zdcnMZSkkxWMzoIx1gb1M2K7l2fFq8FSD1qaSK25XCb8raTzrVTbsKqCQ6Z3OsIl
ZWb39+5pXkA=
=wFch
-----END PGP SIGNATURE-----
--
This article has been digitally signed by the moderator, using PGP.
Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-01-09 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-07 5:00 Full featured Win95 dialup to Linux Christoph Lameter
1996-01-09 5:00 ` Terry Tanski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox