tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: George Gallen <ggallen () slackinc ! com>
To: tru64-unix-managers
Subject: Summary: tcp wrapper & external program for allow/deny
Date: Thu, 29 Mar 2001 21:46:03 +0000	[thread overview]
Message-ID: <98590240717585.tru64-unix-managers.marc@archive.invalid> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------_=_NextPart_001_01C0B899.A7C62760", Size: 7375 bytes --]

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0B899.A7C62760
Content-Type: text/plain;
	charset="iso-8859-1"

Thanks for the responses.
 
I seem to have received two methods:
 
1. using the twist from within the hosts.{allow | deny} file
 
telnetd: 10.10.1.1 : twist( /usr/local/timeok && /usr/sbin/telnetd || cat
/etc/bad_timing )

/usr/local/timeok should be set up to exit with zero status for the allowed

times, and with non-zero status otherwise.

 

2. using cron to swap in/out hosts.allow file depending on the time it runs.
Have one

 hosts.allow for day, one for evening or whatever, and have cron copy it to
hosts.allow

or create a soft link to the appropriate hosts.allow file

 

 

Thanks

George

 

 

-----Original Message-----
From: George Gallen [mailto:ggallen@slackinc.com]
Sent: Thursday, March 29, 2001 3:52 PM
To: 'tru64-unix-managers@ornl.gov'
Subject: tcp wrapper & external program for allow/deny



We currently have tcp wrappers running on our system, and is functioning
fine. 

I didn't see anyway for this in the docs, but... can tcp_wrappers be setup
so that 
a script can allow/deny a connection? 

What I want to do is allow a connection from an IP, but only between certain
hours 
(I'd rather not put this in the .login script, since it would affect all
users from this IP, 
and only  when loggin in via telnet - (ie. LAT connection can be anytime -
it's a local 
connection) 

Where timeok is a script/and or PERL routine that will determine if the
login time is 
ok. Is it possible for the script to set a varible or flag so that
tcp_wrapper will not 
allow the connection? 

/etc/hosts.allow entry 

telnetd: 10.10.1.1 : (/usr/local/timeok) 

Thanks 
George 

George Gallen 
Senior Programmer/Analyst 
Accounting/Data Division 
ggallen@slackinc.com 
ph:856.848.1000 Ext 220 

SLACK Incorporated - An innovative information, education and management
company 
http://www.slackinc.com <http://www.slackinc.com>  


------_=_NextPart_001_01C0B899.A7C62760
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>tcp wrapper & external program for allow/deny</TITLE>

<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=650244321-29032001>Thanks 
for the responses.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=650244321-29032001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=650244321-29032001>I seem 
to have received two methods:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=650244321-29032001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=650244321-29032001>1. 
using the twist from within the hosts.{allow | deny} file</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=650244321-29032001></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=650244321-29032001>
<P><FONT face=Arial color=#0000ff size=2>telnetd: 10.10.1.1 : twist( 
/usr/local/timeok &amp;&amp; /usr/sbin/telnetd || cat /etc/bad_timing 
)</FONT></P>
<P><FONT face=Arial color=#0000ff size=2>/usr/local/timeok should be set up to 
exit with zero status for the allowed</FONT></P>
<P><FONT face=Arial color=#0000ff size=2>times, and with non-zero status 
otherwise.</FONT></P>
<P><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff size=2>2. using 
cron to swap in/out hosts.allow file depending on the time it runs. Have 
one</FONT></SPAN></P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2>&nbsp;hosts.allow for day, one for evening or whatever, and have cron 
copy it to hosts.allow</FONT></SPAN></P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff size=2>or 
create a soft link to the appropriate hosts.allow file</FONT></SPAN></P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2>Thanks</FONT></SPAN></P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2>George</FONT></SPAN></P>
<P><SPAN class=650244321-29032001><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=650244321-29032001></SPAN>&nbsp;</P></SPAN></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader><FONT face="Times New Roman" 
  size=2>-----Original Message-----<BR><B>From:</B> George Gallen 
  [mailto:ggallen@slackinc.com]<BR><B>Sent:</B> Thursday, March 29, 2001 3:52 
  PM<BR><B>To:</B> 'tru64-unix-managers@ornl.gov'<BR><B>Subject:</B> tcp wrapper 
  &amp; external program for allow/deny<BR><BR></FONT></DIV>
  <P><FONT face=Arial size=2>We currently have tcp wrappers running on our 
  system, and is functioning fine.</FONT> </P>
  <P><FONT face=Arial size=2>I didn't see anyway for this in the docs, but... 
  can tcp_wrappers be setup so that</FONT> <BR><FONT face=Arial size=2>a script 
  can allow/deny a connection?</FONT> </P>
  <P><FONT face=Arial size=2>What I want to do is allow a connection from an IP, 
  but only between certain hours</FONT> <BR><FONT face=Arial size=2>(I'd rather 
  not put this in the .login script, since it would affect all users from this 
  IP,</FONT> <BR><FONT face=Arial size=2>and only&nbsp; when loggin in via 
  telnet - (ie. LAT connection can be anytime - it's a local</FONT> <BR><FONT 
  face=Arial size=2>connection)</FONT> </P>
  <P><FONT face=Arial size=2>Where timeok is a script/and or PERL routine that 
  will determine if the login time is</FONT> <BR><FONT face=Arial size=2>ok. Is 
  it possible for the script to set a varible or flag so that tcp_wrapper will 
  not</FONT> <BR><FONT face=Arial size=2>allow the connection?</FONT> </P>
  <P><FONT face=Arial size=2>/etc/hosts.allow entry</FONT> </P>
  <P><FONT face=Arial size=2>telnetd: 10.10.1.1 : (/usr/local/timeok)</FONT> 
</P>
  <P><FONT face=Arial size=2>Thanks</FONT> <BR><FONT face=Arial 
  size=2>George</FONT> </P>
  <P><B><FONT face="Times New Roman" color=#800000 size=2>George 
  Gallen</FONT></B> <BR><FONT face="Times New Roman" color=#800000 size=2>Senior 
  Programmer/Analyst</FONT> <BR><FONT face="Times New Roman" color=#800000 
  size=2>Accounting/Data Division</FONT> <BR><FONT face="Times New Roman" 
  color=#800000 size=2>ggallen@slackinc.com</FONT> <BR><FONT 
  face="Times New Roman" color=#800000 size=2>ph:856.848.1000 Ext 220</FONT> 
</P>
  <P><B><FONT face="Times New Roman" color=#800000 size=2>SLACK 
  Incorporated</FONT></B><FONT face="Times New Roman" color=#800000 size=2> -<I> 
  An innovative information, education and management company</I></FONT> 
  <BR><U><FONT face="Times New Roman" color=#0000ff size=2><A target=_blank 
  href="http://www.slackinc.com">http://www.slackinc.com</A></FONT></U> 
</P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C0B899.A7C62760--

                 reply	other threads:[~2001-03-29 21:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox