1 ##################### Change following ###################
2 ## must be matched to descriptions in html files ########
3 ## some other parameters exist in opengatesrv.h ########
5 # Change HOSTADDR to your gateway client side IP address#
6 #########################################################
7 HOSTADDR = 192.168.29.138
9 ### first web access directory top entered by forwarding
10 # top dir (must be *NonSSL* page top)
11 HTMLTOP1 = /usr/local/www/data
13 ### subsequent web access directory and files
14 # top dir (can be SSL page top)
15 HTMLTOP2 = /usr/local/www/data
17 # opengate documents directory relative to HTMLTOP2
18 OPENGATEDIR = /opengate
20 ### opengate cgi program
21 CGIPATH = /usr/local/www/cgi-bin${OPENGATEDIR}
22 CGIPROG = opengatesrv.cgi
24 ### opengatesrv configuration file(copied from ../conf/opengatesrv.conf)
25 CONFIGFILE = /etc/opengatesrv.conf
27 ### use perl script(=1) to add firewall rule or execl ipfw directly(=0)
28 # 1 is for flexible control and 0 is for simple control(full open).
30 ### firewall control perl script (copied from ../conf/opengatefw.pl)
31 FWSCRIPT = opengatefw.pl
32 FWSCRIPTPATH = /etc/${FWSCRIPT}
34 ### lockfile for ipfw exclusive exec
35 LOCKFILE=/tmp/opengate.lock
37 ### htmldocs and the languages (first one is the default language)
38 # store documents in each language directory under OPENGATEDIR
39 HTMLDOCS=topindex.html index.html index-ssl.html accept.html accept2.html deny.html
41 ACCEPTDOC = accept.html
46 # path to ipfw command
48 ##########################################################
50 OGPATH=${HTMLTOP2}${OPENGATEDIR}
52 CFLAGS=-DCONFIGFILE=\"${CONFIGFILE}\" \
53 -DOPENGATEDIR=\"${OPENGATEDIR}\" \
54 -DDENYDOC=\"${DENYDOC}\" \
55 -DOGPATH=\"${OGPATH}\" \
56 -DACCEPTDOC=\"${ACCEPTDOC}\" \
57 -DIPFWPATH=\"${IPFWPATH}\" \
58 -DFWSCRIPTPATH=\"${FWSCRIPTPATH}\" \
59 -DFWSCRIPT=\"${FWSCRIPT}\" \
60 -DLOCKFILE=\"${LOCKFILE}\" \
61 -DUSEFWSCRIPT=${USEFWSCRIPT} \
62 -DARPPATH=\"${ARPPATH}\" \
63 -DHTMLLANGS="\"${HTMLLANGS}\""
65 LIBS = -lssl -lcrypto -lradius -lpam
66 OBJS = main.o utilities.o comm-auth.o comm-cgi.o comm-java.o comm-ipfw.o comm-arp.o error.o tcp_connect.o sock_ntop_host.o wrapper.o signal.o auth-pam.o auth-rad.o auth-pop3s.o comm-userdb.c
74 ${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBS}
77 rm -f ${PROG} ${CLEANFILES}
79 install: install-cgi install-java install-html install-conf install-fwscript
83 ## Copy CGI program and Set S bit ##
84 .if !exists(${CGIPATH})
87 cp ${PROG} ${CGIPATH}/${CGIPROG}
88 chmod 4755 ${CGIPATH}/${CGIPROG}
93 ## Copy JAVA program ##
94 .if !exists(${OGPATH})
97 cp ../javahtml/*.class ${OGPATH}
98 cp ../javahtml/*.jar ${OGPATH}
103 ## Copy HTML documents and insert addresses ##
104 .if exists(${HTMLTOP1}/index.html)
105 mv ${HTMLTOP1}/index.html ${HTMLTOP1}/index.html.original
107 .for LANG in ${HTMLLANGS}
108 .if exists(../javahtml/${LANG})
109 .if !exists(${OGPATH}/${LANG})
110 mkdir ${OGPATH}/${LANG}
112 .for DOC in ${HTMLDOCS}
113 .if exists(../javahtml/${LANG}/${DOC})
114 sed -e 's/%%HOSTADDR%%/${HOSTADDR}/g' \
115 -e 's!%%OPENGATEDIR%%!${OPENGATEDIR}!g' \
116 <../javahtml/${LANG}/${DOC} >${OGPATH}/${LANG}/${DOC}
119 mv ${OGPATH}/${LANG}/topindex.html ${HTMLTOP1}/index.html.${LANG}
125 ## Copy CGI program ##
126 cp ../conf/opengatesrv.conf ${CONFIGFILE}
131 ## Copy firewall control script
133 cp ../conf/${FWSCRIPT} ${FWSCRIPTPATH}
152 comm-userdb.o: ${HDRS}
158 auth-pop3s.o: ${HDRS}