× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





> I need to implement telnet exit programs to close multiple access points
> I am about to open up on my 170 by having multiple web sites running on
> it.  I have no idea what this program looks like, where it should
> "live", or how to put it in place.  Any ideas, pointers, or
> suggestions???

This is (a stripped version of) the program I wrote for our webserver. It allows
telnet from only one IP-address. Register the program with WRKREGINF (
QIBM_QTG_DEVINIT).

PGM        PARM(&PVUSRDI &PVDEVDI &PVCNNDI &PVENVOPT +
             &PVENVOPTL &PVALWCNN &PVALWASO)
DCL        VAR(&PVUSRDI) TYPE(*CHAR) LEN(64)
DCL        VAR(&PVDEVDI) TYPE(*CHAR) LEN(256)
DCL        VAR(&PVCNNDI) TYPE(*CHAR) LEN(64)
DCL        VAR(&PVENVOPT) TYPE(*CHAR) LEN(1024)
DCL        VAR(&PVENVOPTL) TYPE(*CHAR) LEN(4)
DCL        VAR(&PVALWCNN) TYPE(*CHAR) LEN(1)
DCL        VAR(&PVALWASO) TYPE(*CHAR) LEN(1)
DCL        VAR(&CONDIP) TYPE(*CHAR) LEN(20)
DCL        VAR(&IPADR) TYPE(*CHAR) LEN(15)
DCL        VAR(&IPADR1) TYPE(*CHAR) LEN(3)
DCL        VAR(&IPADR2) TYPE(*CHAR) LEN(3)
DCL        VAR(&IPADR3) TYPE(*CHAR) LEN(3)
DCL        VAR(&IPADR4) TYPE(*CHAR) LEN(3)
DCL        VAR(&W4X) TYPE(*CHAR) LEN(4)
CHGVAR     VAR(&CONDIP) VALUE(%SST(&PVCNNDI 5 20))
CHGVAR     VAR(&W4X) VALUE(X'00000000')
CHGVAR     VAR(%SST(&W4X 4 1)) VALUE(%SST(&CONDIP 5 1))
CHGVAR     VAR(&IPADR1) VALUE(%BIN(&W4X))
CHGVAR     VAR(&W4X) VALUE(X'00000000')
CHGVAR     VAR(%SST(&W4X 4 1)) VALUE(%SST(&CONDIP 6 1))
CHGVAR     VAR(&IPADR2) VALUE(%BIN(&W4X))
CHGVAR     VAR(&W4X) VALUE(X'00000000')
CHGVAR     VAR(%SST(&W4X 4 1)) VALUE(%SST(&CONDIP 7 1))
CHGVAR     VAR(&IPADR3) VALUE(%BIN(&W4X))
CHGVAR     VAR(&W4X) VALUE(X'00000000')
CHGVAR     VAR(%SST(&W4X 4 1)) VALUE(%SST(&CONDIP 8 1))
CHGVAR     VAR(&IPADR4) VALUE(%BIN(&W4X))
CHGVAR     VAR(&IPADR) VALUE(&IPADR1 *CAT '.' *CAT +
             &IPADR2 *CAT '.' *CAT &IPADR3 *CAT '.' +
             *CAT &IPADR4)

             IF         COND(&IPADR *EQ '001.001.001.001') THEN(DO)
/* USRPRF */ CHGVAR     VAR(%SST(&PVUSRDI 05 10)) VALUE('xxxxxxxxxx')
/* CURLIB */ CHGVAR     VAR(%SST(&PVUSRDI 15 10)) VALUE('xxxxxxxxxx')
/* INLPGM */ CHGVAR     VAR(%SST(&PVUSRDI 25 10)) VALUE('xxxxxxxxxx')
/* INLMNU */ CHGVAR     VAR(%SST(&PVUSRDI 35 10)) VALUE('xxxxxxxxxx')
/* DEVD   */ CHGVAR     VAR(%SST(&PVDEVDI 01 10)) VALUE('xxxxxxxxxx')
/* SIGNON */ CHGVAR     VAR(&PVALWASO) VALUE('0') /* 1=bypass signonscreen */
/* ALLOW  */ CHGVAR     VAR(&PVALWCNN) VALUE('1')
             RETURN
             ENDDO

/* NOT ALW*/ CHGVAR     VAR(&PVALWCNN) VALUE('0')

SNDPGMMSG  MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +
              MSGDTA('Telnetrequest rejected from' +
              *BCAT &IPADR) TOMSGQ(*SYSOPR)
ENDPGM


Info on Telnet exitprograms:
http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/bookmgr.cmd/BOOKS/QB3ANL03/E.5.1

M.Sjardin - Blue IT Group (NL)


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.