On Thu, Jul 13, 2000 at 04:52:27PM +0930, Andrew Hill wrote:
> Well, I don't know what parts you are carefully reading that indicate
> that you should use the above command, becuase to me, the page says to

This part:

    tcprulescheck says what tcpserver will do with a connection from
    IP address $TCPREMOTEIP with host name $TCPREMOTEHOST and remote
    connection information $TCPREMOTEINFO, following the rules
    compiled into cdb by tcprules.

I said to read carefullly.  Reading just the first two words after the
heading does not constitute a careful reading. :)  If you bother to
keep going, the paragraph explains that tcprulescheck uses the
contents of the environment variables TCPREMOTEIP, TCPREMOTEHOST, and
TCPREMOTEINFO to determine which entry in the cdb to return.  If all
three are unset, you get the default rule back.  If you don't want the
default rule, set one or more of them.

> use the command:
> 
>   tcprulescheck cdb
> 
> Anyway, the command you have suggested still gives me the same result as
> before.

Apparently your shell doesn't support that syntax.  (Maybe you use
(t)csh?)  What you need to do is set the environment variable
TCPREMOTEIP to the address you want to test, and then run
"tcprulescheck /etc/tcp.smtp.cdb".  In (t)csh, the syntax is:

setenv TCPREMOTEIP 203.34.190.170
tcprulescheck /etc/tcpserver/tcp.smtp.cdb

Note:  I've tested both of my suggestions with ucspi-tcp 0.88, and
both work here (in the appropriate shells of course).

Brian

Reply via email to