📄
字号:
如何获取该软件。</P>
<P>2 编译及安装 </P>
<P>编辑Makefile.config(详见附录1),否则,有一些功能无法实现。然后执行如下命令序列:</P>
<P>make;make clean;make install </P>
<P>3.设置 /usr/local/etc/netperm.table及/etc/inetd.conf 和 /etc/services
</P>
<P> netperm.table是fwtk启动时读取的配置文件,inetd.conf是守护进程inetd的配置文件。
我们使用inetd守护进程来启动,故需要配置inetd.conf来提供fwtk的各种服务。另外,
还需配置/etc/services文件给出相应服务的端口号。 </P>
<P>在本例中,http的代理由http-gw提供;ftp的代理由ftp-gw提供;telnet的代理由tn-gw提供;
而pop3的代理由plug-gw提供。</P>
<P> netperm.table的实例如下,其各项设置的意义十分明显,请自行了解: </P>
<P>netacl-telnetd: permit-hosts 127.0.0.1 -exec /usr/sbin/in.telnetd
<BR>netacl-telnetd: permit-hosts 10.0.* -exec
/usr/sbin/in.telnetd<BR>netacl-rlogind: permit-hosts 10.0.* -exec
/usr/local/etc/rlogin-gw </P>
<P>http-gw: timeout 3600 <BR>http-gw: default-httpd 10.0.0.1
<BR>http-gw: permit-hosts 10.0.* -log all <BR>http-gw: ftp-proxy
/usr/local/etc/ftp-gw <BR>http-gw: deny-hosts unknown </P>
<P>ftp-gw: timeout 7200 <BR>ftp-gw: permit-hosts 10.0.* -log retr
stor <BR>ftp-gw: deny-hosts unknown</P>
<P>tn-gw: timeout 7200 <BR>tn-gw: permit-hosts 10.0.* -passok -xok
<BR>tn-gw: deny-hosts unknown </P>
<P>plug-gw: port 2012 10.0.* -plug-to pop.netease.com -port 110
<BR>plug-gw: port 2013 10.0.* -plug-to pop.163.net -port 110
<BR>plug-gw: port 2014 10.0.* -plug-to www.ynmail.com -port 110
<BR>plug-gw: port 2015 10.0.* -plug-to pop.263.net -port 110
<BR>plug-gw: port 2016 10.0.* -plug-to pop1.nettaxi.com -port
110<BR>plug-gw: port 2017 10.0.* -plug-to pop.sohu.com -port 110
<BR>plug-gw: port 2018 10.0.* -plug-to pop.21cn.com -port 110 </P>
<P>inetd.conf的相应内容如下: <BR>ftp-a stream tcp nowait root
/usr/local/etc/ftp-gw ftp-gw <BR>telnet-a stream tcp nowait root
/usr/local/etc/tn-gw tn-gw<BR>www-a stream tcp nowait root
/usr/local/etc/http-gw http-gw <BR>ftp stream tcp nowait root
/usr/sbin/tcpd wu.ftpd -l -a <BR>telnet stream tcp nowait root
/usr/sbin/tcpd in.telnetd <BR>pop-3 stream tcp nowait root
/usr/sbin/tcpd ipop3d<BR>#imap stream tcp nowait root /usr/sbin/tcpd
imapd </P>
<P>pop-gw2 stream tcp nowait root /usr/local/etc/plug-gw plug-gw
2012 <BR>pop-gw3 stream tcp nowait root /usr/local/etc/plug-gw
plug-gw 2013 <BR>pop-gw4 stream tcp nowait root
/usr/local/etc/plug-gw plug-gw 2014 <BR>pop-gw5 stream tcp nowait
root /usr/local/etc/plug-gw plug-gw 2015 <BR>pop-gw6 stream tcp
nowait root /usr/local/etc/plug-gw plug-gw 2016 <BR>pop-gw7 stream
tcp nowait root /usr/local/etc/plug-gw plug-gw 2017<BR>pop-gw8
stream tcp nowait root /usr/local/etc/plug-gw plug-gw 2018 </P>
<P>相应的应在/etc/services/中加入如下内容: </P>
<P>ftp 21/tcp <BR>ftp-a 2021/tcp <BR>telnet 23/tcp <BR>telnet-a
2023/tcp<BR>www 80/tcp http # WorldWideWeb HTTP <BR>www 80/udp #
HyperText Transfer Protocol<BR>www-a 8000/tcp <BR>pop-gw 2010/tcp
<BR>pop-gw1 2011/tcp <BR>pop-gw2 2012/tcp <BR>pop-gw3 2013/tcp
<BR>pop-gw4 2014/tcp<BR>pop-gw5 2015/tcp<BR>pop-gw6
2016/tcp<BR>pop-gw7 2017/tcp<BR>pop-gw8 2018/tcp<BR>pop-gw9
2019/tcp<BR>pop-gw10 2020/tcp </P>
<P>附录1 fwtk 2.1的Makefile.config文件</P>
<P># <BR># Copyright (c) 1993, Trusted Information Systems,
Incorporated<BR># All rights reserved. <BR># <BR># Redistribution
and use are governed by the terms detailed in the <BR># license
document ("LICENSE") included with the toolkit. <BR>#</P>
<P># <BR># Author: Marcus J. Ranum, Trusted Information Systems,
Inc.<BR># <BR># RcsId: "$Header:
/home/rmurphy/fwtk/fwtk/RCS/Makefile.config.linux,v 1.2<BR>#
1998/01/13 23:50:46 rmurphy Exp $" </P>
<P># Your C compiler (eg, "cc" or "gcc") <BR>CC= gcc</P>
<P># program to use for installation -- this may or may not preserve
<BR># old versions (or whatever). assumes that it takes
parameters:<BR># copy source dest<BR>CP= cp </P>
<P># Defines for your operating system<BR>#
<BR>DEFINES=-DLINUX<BR>#DEFINES=-DSYSV -DSOLARIS</P>
<P># Options for your compiler (eg, "-g" for debugging, "-O"
for<BR># optimizing, or "-g -O" for both under GCC) <BR>#COPT= -g
-traditional $(DEFINES) <BR>COPT= -O $(DEFINES)<BR>#COPT= -O
$(DEFINES)</P>
<P># Version of "make" you want to use<BR>#MAKE= gnumake<BR>MAKE=
make </P>
<P># Your ranlib utility (use "touch" if you don't have ranlib)
<BR>RANLIB= ranlib <BR>#RANLIB= touch</P>
<P># Destination directory for installation of binaries <BR>DEST=
/usr/local/etc</P>
<P># Destination directory for installation of man pages
<BR>#DESTMAN= $(DEST)/../man</P>
<P># Names of any auxiliary libraries your system may require (e.g.,
-lsocket) <BR># If you want to link against a resolver library,
specify it here. <BR>#AUXLIB= <BR>#AUXLIB= -lsocket <BR># Some
versions of Linux have broken the crypt() function out into a <BR>#
separate library - uncomment the following line if authsrv fails to
build.<BR>AUXLIB= -lcrypt</P>
<P># For Solaris:<BR>#AUXLIB= -lresolv -lsocket -lnsl </P>
<P># DBM library should be specified if it is an external library or
<BR># you with to use a different one than what is included in libc
<BR>#DBMLIB= -lndbm</P>
<P># for Linux: <BR>DBMLIB=-lgdbm <BR># "Linux" is such a ephemeral
concept. Unfortunately, one of the <BR># significant
incompatibilities between distributions and versions<BR># is where
the DBM libraries end up. "-ldbm", "-ldb", or "-lgdbm" could <BR>#
work for you. "-lgdbm" works for me (Slackware Linux 2.3). <BR># for
BSD:<BR>#DBMLIB=</P>
<P># Flags to pass to the linker (eg, -static for static binaries
under GCC, <BR># or -Bstatic for static binaries under SunOS
4.1.x)<BR>#LDFL= -Bstatic <BR>#LDFL= <BR>LDFL= -g -static <BR>#
Flags for X gateway link - usually the same as LDFL <BR>XLDFL=-g
</P>
<P># Location of the fwtk sources [For #include by any external
tools needing it]<BR>#FWTKSRCDIR=/u/b/mjr/firewall/fwtk
<BR>FWTKSRCDIR=/usr/local/src/fwtk</P>
<P># Location of X libraries for X-gw
<BR>XLIBDIR=/usr/X11R6/lib<BR>#XLIBDIR=/usr/local/X11R5/lib</P>
<P># X Libraries <BR># For BSD:<BR>#XLIBS= -L$(XLIBDIR) -lXaw -lXmu
-lXt -lXext -lX11 -lSM -lICE -lipc <BR>#XLIBS = -L$(XLIBDIR) -lXaw
-lXmu -lXt -lXext -lX11 <BR># for Linux:</P>
<P>XLIBS = -L$(XLIBDIR) -lXaw -lXmu -lXt -lXext -lX11 -lc</P>
<P># for BSD/OS 2.0: <BR>#XLIBS = -L$(XLIBDIR) -lXaw -lXmu -lXt
-lXext -lX11 -lSM -lICE -lXext <BR># For SunOS: <BR>#XLIBS =
-L$(XLIBDIR) -lXaw -lXmu -lXt -lXext -lX11 </P>
<P># Location of X include files <BR>XINCLUDE=/usr/X11R6/include
<BR>#XINCLUDE=/usr/local/X11R5/include</P>
<P># Objects to include in libfwall for SYSV <BR>SYSVOBJ= signal.o
</P></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><!--底部banner:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR>
<TD align=middle height=80><!-- here is add begin--><IFRAME frameBorder=0
height=60 marginHeight=0 marginWidth=0 noResize scrolling=no
src="E:\os\rtos\系统介绍\代理服务器fwtk 2_1的安装和设置.files\adjuggler(1).htm"
width=468>
<script language=JavaScript src=http://ad2.enet.com.cn/cgi-bin/adjuggler?Pool=bottom&ajtype=jscript></script>
</IFRAME><NOSCRIPT><A
href="http://ad2.enet.com.cn/cgi-bin/adjuggler?ajtype=cgi_click&ajkey=bottom"
target=_blank><IMG border=0 height=60
src="代理服务器fwtk 2_1的安装和设置.files/egames.gif" width=468></A></NOSCRIPT> <!-- here is add end--></TD></TR>
<TR>
<TD bgColor=#ff0000 height=2><SPACER height="1"
type="block"></TD></TR></TBODY></TABLE><!--底部banner:结束--><!--Copyright:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=380>
<TBODY>
<TR>
<TD height=8></TD></TR>
<TR align=middle>
<TD><A class=bottom
href="http://home.enet.com.cn/guanyuenet.shtml">关于eNet</A> | <A
class=bottom href="http://home.enet.com.cn/ad_price.shtml">联系广告</A> | <A
class=bottom href="http://home.enet.com.cn/zhaopin_1.shtml">诚邀加盟</A> | <A
class=bottom href="http://home.enet.com.cn/reg.shtml">用户注册</A> | <A
class=bottom href="mailto:webmaster@enet.com.cn">用户反馈</A> | <A
class=bottom href="http://home.enet.com.cn/link.shtml">友情链接</A> </TD></TR>
<TR>
<TD height=8></TD></TR>
<TR>
<TD align=middle class=bottom>联系: <A class=bottom
href="mailto:webmaster@enet.com.cn">webmaster@enet.com.cn</A> 电话:
86-10-65385588 <BR>Copyright© 2000 硅谷动力网络技术有限公司 版权所有
</TD></TR></TBODY></TABLE><!--Copyright:结束--></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -