#### section of authentication server configuration
#this setting is selected when [username] only is entered in auth form.
-default:tc=pam
+default:tc=cs
#this setting is selected when [username@cs] is entered in auth form.
cs:address=192.168.0.2:protocol=pop3s:tc=cgiconf1
--- /dev/null
+### set these to your outside interface network and netmask and ip
+oif="fxp1"
+onet="192.168.0.0"
+omask="255.255.255.0"
+oip="192.168.0.124"
+
+### set these to your inside interface network and netmask and ip
+iif="fxp0"
+inet="192.168.1.0"
+imask="255.255.255.0"
+iip="192.168.1.1"
+
+fwcmd="/sbin/ipfw"
+
+### divert packet to NATD
+$fwcmd add 1 divert natd ip from any to any via ${oif}
+
+### Stop spoofing
+$fwcmd add deny all from ${inet}:${imask} to any in via ${oif}
+$fwcmd add deny all from ${onet}:${omask} to any in via ${iif}
+
+### Stop http from softeather
+$fwcmd add deny tcp from 192.168.0.0:255.255.255.0 to ${oip} 80
+$fwcmd add deny tcp from 192.168.0.0:255.255.255.0 to ${oip} 443
+
+### Allow from / to myself
+$fwcmd add pass all from ${iip} to any via ${iif}
+$fwcmd add pass all from ${oip} to any via ${oif}
+$fwcmd add pass all from any to ${iip} via ${iif}
+$fwcmd add pass all from any to ${oip} via ${oif}
+
+### Allow DNS queries out in the world
+### (if DNS is on localhost, delete passDNS)
+$fwcmd add pass udp from any 53 to any
+$fwcmd add pass udp from any to any 53
+$fwcmd add pass tcp from any to any 53
+$fwcmd add pass tcp from any 53 to any
+
+### Forwarding http connection from unauth client
+$fwcmd add 60000 fwd localhost tcp from ${inet}:${imask} to any 80
+$fwcmd add 60010 fwd localhost tcp from ${inet}:${imask} to any 443
+
+### Allow TCP through if setup succeeded
+$fwcmd add 60100 pass tcp from any to any established
--- /dev/null
+### set these to your outside interface network and prefixlen and ip
+oif="em0"
+onet="fe80::"
+oprefixlen="64"
+oip="fe80::202:b3ff:fe0a:c30e"
+
+### set these to your inside interface network and prefixlen and ip
+iif="bge0"
+inet="fe80::"
+iprefixlen="64"
+iip="fe80::215:f2ff:fe67:6bfb"
+
+### path to command "ip6fw"
+fw6cmd="/sbin/ip6fw"
+
+${fw6cmd} add pass all from ${iip} to any
+${fw6cmd} add pass all from any to ${iip}
+${fw6cmd} add pass all from ${oip} to any
+${fw6cmd} add pass all from any to ${oip}
+
+### Allow RA RS NS NA Redirect...
+${fw6cmd} add pass ipv6-icmp from any to any
+
+# Allow IP fragments to pass through
+${fw6cmd} add pass all from any to any frag
+
+# Allow RIPng
+${fw6cmd} add pass udp from fe80::/10 521 to ff02::9 521
+${fw6cmd} add pass udp from fe80::/10 521 to fe80::/10 521
+
+### Allow TCP through if setup succeeded
+${fw6cmd} add 60100 pass tcp from any to any established
+
+# TCP reset notice message
+${fw6cmd} add 60200 reset tcp from any to any 80
+${fw6cmd} add 60300 reset tcp from any to any 443
Add FTPS authentication.\r
</DD>\r
<DT>\r
-Ver.1.2.4 at 2006.3.3</DT>\r
+Ver.1.2.4 at 2006.3.14</DT>\r
<DD>\r
Modify documentations and comments.\r
</DD>\r
\r
options IPSEC\r
options IPSEC_ESP\r
-options TCP_DROP_SYSFIN\r
+options TCP_DROP_SYNFIN\r
</pre></td></tr></table>\r
\r
<li>When use NAT, IPDIVERT is necessary. </li>\r
<table><tr><td>httpd.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:80\r
<VirtualHost 192.168.55.1:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
NameVirtualHost [2001:e38:3661:1a5::1]:80\r
<VirtualHost [2001:e38:3661:1a5::1]:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
NameVirtualHost 192.168.0.34:80\r
<VirtualHost 192.168.0.34:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate4.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
<br>\r
<table><tr><td>ssl.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:443\r
<VirtualHost 192.168.55.1:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
\r
NameVirtualHost [2001:e38:3661:1a5::1]:443\r
<VirtualHost [2001:e38:3661:1a5::1]:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
\r
NameVirtualHost 192.168.0.34:443\r
<VirtualHost 192.168.0.34:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate4.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
\r
options IPSEC\r
options IPSEC_ESP\r
-options TCP_DROP_SYSFIN\r
+options TCP_DROP_SYNFIN\r
</pre></td></tr></table>\r
\r
<p>\r
<table><tr><td>httpd.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:80\r
<VirtualHost 192.168.55.1:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
NameVirtualHost [2001:e38:3661:1a5::1]:80\r
<VirtualHost [2001:e38:3661:1a5::1]:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
NameVirtualHost 192.168.0.34:80\r
<VirtualHost 192.168.0.34:80>\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
- DocumentRoot /usr/local/www\r
+ DocumentRoot /usr/local/www/data\r
ServerName opengate4.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
CustomLog "|/usr/bin/logger -p local5.info" combined\r
<br>\r
<table><tr><td>ssl.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:443\r
<VirtualHost 192.168.55.1:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
\r
NameVirtualHost [2001:e38:3661:1a5::1]:443\r
<VirtualHost [2001:e38:3661:1a5::1]:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
\r
NameVirtualHost 192.168.0.34:443\r
<VirtualHost 192.168.0.34:443>\r
- DocumentRoot "/usr/local/www"\r
+ DocumentRoot "/usr/local/www/data"\r
ServerName opengate4.is.saga-u.ac.jp:443\r
ServerAdmin administrator@opengate.is.saga-u.ac.jp\r
ErrorLog "|/usr/bin/logger -p local6.info"\r
</HEAD>
<BODY>
+<P>You can use the network.</P>
+
<SCRIPT LANGUAGE="JavaScript">
<!--
-if(!navigator.javaEnabled())
- alert("Cannot run Java. You should click TERMINATE link in another page to close the network.");
+if(!navigator.javaEnabled()) {
+ document.write("<h3>Cannot run Java.<BR>");
+ document.write("If your computer does not have Java VM, access <a href=http://java.com/en/index.jsp>java.com</a> to download.<BR>");
+ document.write("You should click <a href=**TerminateUrlHere**>TERMINATE</a> link to close network.</h3>");
+}
w=window.open("**InfomationUrlHere**","window1");
//-->
</SCRIPT>
<NOSCRIPT>
-<H2>Cannot run JavaScript. Check setting.</H2>
+<H3>Cannot run JavaScript. Check setting.</H3>
</NOSCRIPT>
-<P>You can use the network, if your name appears below.</P>
<HR>
<DIV ALIGN=CENTER>
**OpengateAppletHere**
<HR>
<table border="1">
-<tr><td><font color=red">
-If your browser denies to open the working window, click
-<a href="**InfomationUrlHere**" target="_blank">
-here</a> to opne it.</font>
-</td></tr>
<tr><td>
-If your computer does not have Java VM, access
-<a href="http://java.com/en/index.jsp">here</a> to download.
+If your browser denies to open the working window, click below link to open.
+<a href="**InfomationUrlHere**" target="_blank"><h3>[Start Page]</h3></a>
</td></tr>
</table>
You will be disconnected when you stop your WEB browser.
Do not forget to stop your WEB brower when you finish to use the network.
</P>
-<P>
-If you are using user terminals in University Library, please close
-all windows by "CLOSE" in "FILE" menu at the upper left corner of the
-window.
-</P>
-<P>
-<TABLE BORDER=1><TR><TD>
-<B>If your name does not appear</B>, short time usage is permitted. In this case, you should <A HREF=**TerminateUrlHere**>click HERE to close the network</A> (No need to click, when your name appears above).
-</TD></TR></TABLE>
-</P>
</BODY>
</HTML>
<BODY>
<center>
-<img src="/ban.gif" border="0">
-<H2>Network Authentication</H2>
+
+<H2>Network User Authentication</H2>
<hr>
[<a href="https://%%AUTHCGIURL%%?ja">Japanese version</a>]
<hr SIZE=4 WIDTH="100%">
</font></P>
<P><font size=+1>You will be authenticated with your user ID and
-password for systems in 5th group. If you do
+password. If you do
not know your user ID and/or password, please consult CNC.
</font></P>
<div align=right>July 2005
-<br>5th group, Infomation Science, Saga-u</div>
+<br>Saga University</div>
</BODY>
<BODY>
<center>
-<img src="/ban.gif" border="0">
-<H1 align=center>Network Authentication</H1>
+<H1 align=center>Network User Authentication</H1>
<hr>
-[<a href="http://%%CGIURL%%?ja">Japanese version</a>]
+[<a href="http://%%AUTHCGIURL%%?ja">Japanese version</a>]
<hr>
<div align=center>
<P><font size=+1>You are requested to be authenticated before using network.
</font></P>
<P><font size=+1>You will be authenticated with your user ID and
-password for systems in 5th group. If you do
+password. If you do
not know your user ID and/or password, please consult CNC.
</font></P>
<div align=right>July 2005
-<br>5th group, Infomation Science, Saga-u </div>
+<br>Saga University</div>
</BODY>
<a href="https://%%AUTHCGIURL%%?en">Network Authentication</a><br>
<a href="http://%%AUTHCGIURL%%?en">Network Authentication(Unuse SSL)</a>
<hr>
-5th group, Infomation Science, Saga-u
+Saga University
</BODY>
</HTML>
--- /dev/null
+URI: opengate/en/topindex.html
+Content-language: en
+Content-type: text/html
+
+URI: opengate/ja/topindex.html
+Content-language: ja
+Content-type: text/html
+
+URI: opengate/en/topindex.html
+Content-type: text/html
</HEAD>
<BODY>
+<P>\e$B%M%C%H%o!<%/$rMxMQ$G$-$^$9!#\e(B</P>
+
<SCRIPT LANGUAGE="JavaScript">
<!--
-if(!navigator.javaEnabled())
- alert("Java\e$B$,M-8z$K$J$C$F$$$^$;$s!#%M%C%H%o!<%/$rJD$8$k$K$O!"JL%Z!<%8$KI=<($5$l$F$$$kMxMQCfCG$N%j%s%/$r%/%j%C%/$7$F$/$@$5$$!#\e(B");
+if(!navigator.javaEnabled()){
+ document.write("<h3>Java\e$B$,M-8z$K$J$C$F$$$^$;$s!#\e(B<BR>");
+ document.write("\e$B$*;H$$$N%3%s%T%e!<%?$K\e(BJava\e$B$N<B9T4D6-$,L5$$>l9g$K$O!"\e(B<a href=http://java.com/ja/index.jsp>java.com</a>\e$B$+$i%@%&%s%m!<%I$7$F$/$@$5$$!#\e(B<BR>");
+ document.write("\e$B%M%C%H%o!<%/$rJD$8$k$K$O!"\e(B<a href=**TerminateUrlHere**>\e$BMxMQCfCG\e(B</a>\e$B$r%/%j%C%/$7$F$/$@$5$$!#\e(B</h3>");
+}
w=window.open("**InfomationUrlHere**","window1");
//-->
</SCRIPT>
<NOSCRIPT>
-<H2>JavaScript\e$B$,M-8z$K$J$C$F$$$^$;$s!#@_Dj$r3NG'2<$5$$!#\e(B</H2>
+<H3>JavaScript\e$B$,M-8z$K$J$C$F$$$^$;$s!#@_Dj$r3NG'2<$5$$!#\e(B</H3>
</NOSCRIPT>
-<P>\e$B$3$N2<$K%f!<%6L>$,I=<($5$l$?$i!"%M%C%H%o!<%/$rMxMQ$G$-$^$9!#\e(B</P>
<HR>
<DIV ALIGN=CENTER>
**OpengateAppletHere**
<HR>
<table border="1">
-<tr><td><font color=red">
-\e$B$b$&0l$D$N:n6HMQ%&%#%s%I%&$,3+$+$J$$>l9g$K$O!"\e(B
-<a href="**InfomationUrlHere**" target="_blank">\e$B$3$A$i\e(B</a>\e$B$r%/%j%C%/$7$F$/$@$5$$!#\e(B</font>
-</td></tr>
<tr><td>
-\e$B$*;H$$$N%3%s%T%e!<%?$K\e(BJava\e$B$N<B9T4D6-$,L5$$>l9g$K$O!"\e(B
-<a href="http://java.com/ja/index.jsp">\e$B$3$3$+$i\e(B</a>
-\e$B%@%&%s%m!<%I$7$F$/$@$5$$!#\e(B
+\e$B$b$&0l$D$N:n6HMQ%&%#%s%I%&$,3+$+$J$$>l9g$K$O!"2<$N%j%s%/$r%/%j%C%/$7$F$/$@$5$$!#\e(B
+<a href="**InfomationUrlHere**" target="_blank"><h3>[\e$B%9%?!<%H%Z!<%8\e(B]</h3></a>
</td></tr>
</table>
<P>
Web\e$B%V%i%&%6$,=*N;$7$?$H$-$K!"%M%C%H%o!<%/MxMQ5v2D$b<+F0E*$K<h$j>C$5$l$^$9!#\e(B
\e$B0-MQ$5$l$J$$$?$a$K!"MxMQ$,=*$C$?$iI,$:\e(BWeb\e$B%V%i%&%6$r=*N;$7$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FORM METHOD="POST" ACTION="http://%%CGIURL%%">
<hr>
-<p><font size=+1>\e$BITL@$JE@$J$I$,$"$j$^$7$?$i!"Bh8^8&5f%0%k!<%W%M%C%H%o!<%/4IM}<T$K$*?R$M$/$@$5$$!#\e(B
+<p><font size=+1>\e$BITL@$JE@$J$I$,$"$j$^$7$?$i!"%M%C%H%o!<%/4IM}<T$K$*?R$M$/$@$5$$!#\e(B
<div align=right>2005\e$BG/\e(B7\e$B7n\e(B
-<br>\e$B:42lBg3X\e(B \e$BM}9)3XIt\e(B \e$BCNG=>pJs%7%9%F%`3X2J\e(B \e$BBh8^8&5f%0%k!<%W\e(B</div>
+<br>\e$B:42lBg3X\e(B</div>
</BODY>
<a href="https://%%AUTHCGIURL%%?ja">\e$B%M%C%H%o!<%/MxMQ<TG'>Z\e(B</a><br>
<a href="http://%%AUTHCGIURL%%?ja">\e$B%M%C%H%o!<%/MxMQ<TG'>Z!J\e(BSSL\e$BHsBP1~!K\e(B</a>
<HR>
-\e$B:42lBg3X\e(B \e$BM}9)3XIt\e(B \e$BCNG=>pJs%7%9%F%`3X2J\e(B \e$BBh8^8&5f<<\e(B
+\e$B:42lBg3X\e(B
</BODY>
</HTML>
##########################################################
### Opengate hostname for IPv4
-HOSTNAME4 = opengate4.ai.is.saga-u.ac.jp
+#HOSTNAME4 = opengate4.og.saga-u.ac.jp
+HOSTNAME4 = 192.168.1.1
### Opengate hostname for IPv6 (ready IPv4)
# HOSTNAME = ${HOSTNAME4}
-HOSTNAME = opengate.ai.is.saga-u.ac.jp
+HOSTNAME = opengate.og.saga-u.ac.jp
### first web access directory top entered by forwarding
# top dir (must be *NonSSL* page top)
-HTMLTOP1 = /usr/local/apache2/htdocs
+HTMLTOP1 = /usr/local/www/data
### subsequent web access directory and files
# top dir (can be SSL page top)
-HTMLTOP2 = /usr/local/apache2/htdocs
+HTMLTOP2 = /usr/local/www/data
# opengate documents directory relative to HTMLTOP2
OPENGATEDIR = /opengate
### opengate cgi program
-CGIPATH = /usr/local/apache2/cgi-bin${OPENGATEDIR}
+CGIPATH = /usr/local/www/cgi-bin${OPENGATEDIR}
CGIPROG = opengatesrv.cgi
CGIURL = ${HOSTNAME}/cgi-bin${OPENGATEDIR}/${CGIPROG}
AUTHCGIURL = ${HOSTNAME4}/cgi-bin${OPENGATEDIR}/${AUTHCGIPROG}
### use infomation. (1:use 0:not use)
-INFOMATION=1
+INFOMATION=0
INFOMATIONURL = http://sadakari.ai.is.saga-u.ac.jp/
### authentication html document & check opengateauth.h
### opengatesrv configuration file(copied from ../conf/opengatesrv.conf)
-CONFIGFILE = /etc/opengatesrv.conf
+CONFIGPATH = /etc/opengate
+CONFIGFILE = ${CONFIGPATH}/opengatesrv.conf
### use perl script(=1) to add firewall rule or execl ipfw directly(=0)
# 1 is for flexible control and 0 is for simple control(full open).
USEFWSCRIPT=0
### firewall control perl script (copied from ../conf/opengatefw.pl)
FWSCRIPT = opengatefw.pl
-FWSCRIPTPATH = /etc/${FWSCRIPT}
+FWSCRIPTPATH = ${CONFIGPATH}/${FWSCRIPT}
### lockfile for ipfw exclusive exec
LOCKFILE=/tmp/opengate.lock
PROG = opengatesrv
AUTHPROG = opengateauth
AUTHOBJS = opengateauth.o htmltemplate.o
-TESTPROGS = test-get-param test-comm-auth test-comm-ipfw test-comm-java
+TESTPROGS = test-get-param test-comm-auth test-comm-ipfw test-comm-java test-cgi
CLEANFILES = *.o *~ *.core
all: ${PROG} ${AUTHPROG} ${TESTPROGS}
test-comm-java: ${OBJS} test-comm-java.o
${CC} ${CFLAGS} -o $@ ${OBJS} test-comm-java.o ${LIBS}
-
+
+test-cgi: ${OBJS} test-cgi.o
+ ${CC} ${CFLAGS} -o $@ ${OBJS} test-cgi.o ${LIBS}
clean:
rm -f ${PROG} ${AUTHPROG} ${TESTPROGS} ${CLEANFILES}
cp ${PROG} ${CGIPATH}/${CGIPROG}
chmod 4755 ${CGIPATH}/${CGIPROG}
cp ${AUTHPROG} ${CGIPATH}/${AUTHCGIPROG}
- chmod 4755 ${CGIPATH}/${AUTHCGIPROG}
+ chmod 755 ${CGIPATH}/${AUTHCGIPROG}
#
install-html:
## Copy HTML documents and insert addresses ##
-.if exists(${HTMLTOP1}/index.html)
+.if exists(${HTMLTOP1}/index.html) && !exists(${HTMLTOP1}/index.html.original)
mv ${HTMLTOP1}/index.html ${HTMLTOP1}/index.html.original
.endif
+.if exists(${HTMLTOP1}/index.html.var) && !exists(${HTMLTOP1}/index.html.var.original)
+ mv ${HTMLTOP1}/index.html.var ${HTMLTOP1}/index.html.var.original
+.endif
+ cp ../javahtml/index.html.var ${HTMLTOP1}/index.html.var
+
.for LANG in ${HTMLLANGS}
.if exists(../javahtml/${LANG})
.if !exists(${OGPATH}/${LANG})
<../javahtml/${LANG}/${DOC} >${OGPATH}/${LANG}/${DOC}
.endif
.endfor
- mv ${OGPATH}/${LANG}/topindex.html ${HTMLTOP1}/index.html.${LANG}
.endif
.endfor
install-conf:
## Copy CGI program ##
+.if !exists(${CONFIGPATH})
+ mkdir ${CONFIGPATH}
+.endif
cp ../conf/opengatesrv.conf ${CONFIGFILE}
+ cp ../conf/rc.firewall ${CONFIGPATH}
+ cp ../conf/rc.firewall6 ${CONFIGPATH}
#
install-fwscript:
## Copy firewall control script
-.if ${USEFWSCRIPT}
cp ../conf/${FWSCRIPT} ${FWSCRIPTPATH}
-.endif
#
test-comm-ipfw.o: ${HDRS}
test-comm-java.o: ${HDRS}
+
+test-cgi.o: ${HDRS}
port=GetListenPort();
if(port<0){
err_msg("ERR in main: cannot get unused listen port");
- PutClientMsg("Error: Please Call Administrator");
+ PutClientMsg("Error: Please contact to the administrator");
closeExit(1);
}
status = IPV6ONLY;
}else{
err_msg("ERR: Can not get IP address from user %s", userid);
- PutClientMsg("Error: Please Call Administrator");
+ PutClientMsg("Error: Please contact to the administrator");
exit(1);
}
}
status = IPV6ONLY;
}else{
err_msg("ERR: Can not get IP address from user %s", userid);
- PutClientMsg("Error: Please Call Administrator");
+ PutClientMsg("Error: Please contact to the administrator");
exit(1);
}
}
--- /dev/null
+/**************************************************
+opengate CGI test
+ Compile, copy to cgi-bin as cgi and chmod +x to execute.
+ This shows values from getenv.
+
+Copyright (C) 2006 Opengate Project Team
+Written by Yoshiaki Watanabe
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Email: watanaby@is.saga-u.ac.jp
+**************************************************/
+
+#include "opengatesrv.h"
+
+int main(){
+
+ printf("Content-Type: text/html\r\n\r\n\r\n");
+
+ printf("<HTML><HEAD><TITLE>OpengateTest</TITLE></HEAD> \r\n");
+ printf("<BODY> \r\n");
+
+ printf("<TABLE> \r\n");
+
+ printf("<TR><TD>REMOTE_ADDR</TD><TD>%s</TD></TR>\r\n",
+ getenv("REMOTE_ADDR"));
+ printf("<TR><TD>SERVER_ADDR</TD><TD>%s</TD></TR>\r\n",
+ getenv("SERVER_ADDR"));
+ printf("<TR><TD>SERVER_NAME</TD><TD>%s</TD></TR>\r\n",
+ getenv("SERVER_NAME"));
+ printf("<TR><TD>SERVER_PORT</TD><TD>%s</TD></TR>\r\n",
+ getenv("SERVER_PORT"));
+ printf("<TR><TD>QUERY_STRING</TD><TD>%s</TD></TR>\r\n",
+ getenv("QUERY_STRING"));
+ printf("<TR><TD>CONTENT_LENGTH</TD><TD>%s</TD></TR>\r\n",
+ getenv("CONTENT_LENGTH"));
+ printf("<TR><TD>HTTP_REFERER</TD><TD>%s</TD></TR>\r\n",
+ getenv("HTTP_REFERER"));
+
+ printf("</TABLE> \r\n");
+ printf("</BODY></HTML> \r\n\r\n");
+
+ return 0;
+}