OSDN Git Service

v1.2.4 modify comments and documents
authorwatanaby <>
Tue, 14 Mar 2006 01:38:28 +0000 (01:38 +0000)
committerwatanaby <>
Tue, 14 Mar 2006 01:38:28 +0000 (01:38 +0000)
18 files changed:
opengate/conf/opengatesrv.conf
opengate/conf/rc.firewall [new file with mode: 0644]
opengate/conf/rc.firewall6 [new file with mode: 0644]
opengate/doc/Changes.html
opengate/doc/en/install_1_2.html
opengate/doc/ja/install_1_2.html
opengate/javahtml/en/accept.html
opengate/javahtml/en/index-ssl.html
opengate/javahtml/en/index.html
opengate/javahtml/en/topindex.html
opengate/javahtml/index.html.var [new file with mode: 0644]
opengate/javahtml/ja/accept.html
opengate/javahtml/ja/index-ssl.html
opengate/javahtml/ja/index.html
opengate/javahtml/ja/topindex.html
opengate/opengatesrv/Makefile
opengate/opengatesrv/main.c
opengate/opengatesrv/test-cgi.c [new file with mode: 0644]

index f111035..55f0a03 100644 (file)
@@ -9,7 +9,7 @@
 #### 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
diff --git a/opengate/conf/rc.firewall b/opengate/conf/rc.firewall
new file mode 100644 (file)
index 0000000..111ee8c
--- /dev/null
@@ -0,0 +1,44 @@
+### 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
diff --git a/opengate/conf/rc.firewall6 b/opengate/conf/rc.firewall6
new file mode 100644 (file)
index 0000000..30203b9
--- /dev/null
@@ -0,0 +1,36 @@
+### 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
index 2dbb068..962443e 100644 (file)
@@ -394,7 +394,7 @@ Ver.1.1.4 and Ver.1.2.3 at 2006.2.2</DT>
 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
index 01a6dfb..9ae864d 100644 (file)
@@ -409,7 +409,7 @@ options IPV6FIREWALL_VERBOSE_LIMIT=100
 \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
@@ -694,7 +694,7 @@ because of the nature of the SSL protocol. Therefore, use IP-based virtual host,
 <table><tr><td>httpd.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:80\r
 &lt;VirtualHost 192.168.55.1:80&gt;\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
@@ -703,7 +703,7 @@ because of the nature of the SSL protocol. Therefore, use IP-based virtual host,
 NameVirtualHost [2001:e38:3661:1a5::1]:80\r
 &lt;VirtualHost [2001:e38:3661:1a5::1]:80&gt;\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
@@ -712,7 +712,7 @@ NameVirtualHost [2001:e38:3661:1a5::1]:80
 NameVirtualHost 192.168.0.34:80\r
 &lt;VirtualHost 192.168.0.34:80&gt;\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
@@ -721,7 +721,7 @@ NameVirtualHost 192.168.0.34:80
 <br>\r
 <table><tr><td>ssl.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:443\r
 &lt;VirtualHost 192.168.55.1:443&gt;\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
@@ -735,7 +735,7 @@ NameVirtualHost 192.168.0.34:80
 \r
 NameVirtualHost [2001:e38:3661:1a5::1]:443\r
 &lt;VirtualHost [2001:e38:3661:1a5::1]:443&gt;\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
@@ -749,7 +749,7 @@ NameVirtualHost [2001:e38:3661:1a5::1]:443
 \r
 NameVirtualHost 192.168.0.34:443\r
 &lt;VirtualHost 192.168.0.34:443&gt;\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
index 31ee1d1..85d2336 100644 (file)
@@ -395,7 +395,7 @@ options IPV6FIREWALL_VERBOSE_LIMIT=100
 \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
@@ -695,7 +695,7 @@ IP
 <table><tr><td>httpd.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:80\r
 &lt;VirtualHost 192.168.55.1:80&gt;\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
@@ -704,7 +704,7 @@ IP
 NameVirtualHost [2001:e38:3661:1a5::1]:80\r
 &lt;VirtualHost [2001:e38:3661:1a5::1]:80&gt;\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
@@ -713,7 +713,7 @@ NameVirtualHost [2001:e38:3661:1a5::1]:80
 NameVirtualHost 192.168.0.34:80\r
 &lt;VirtualHost 192.168.0.34:80&gt;\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
@@ -722,7 +722,7 @@ NameVirtualHost 192.168.0.34:80
 <br>\r
 <table><tr><td>ssl.conf</td></tr><tr><td><pre>NameVirtualHost 192.168.55.1:443\r
 &lt;VirtualHost 192.168.55.1:443&gt;\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
@@ -736,7 +736,7 @@ NameVirtualHost 192.168.0.34:80
 \r
 NameVirtualHost [2001:e38:3661:1a5::1]:443\r
 &lt;VirtualHost [2001:e38:3661:1a5::1]:443&gt;\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
@@ -750,7 +750,7 @@ NameVirtualHost [2001:e38:3661:1a5::1]:443
 \r
 NameVirtualHost 192.168.0.34:443\r
 &lt;VirtualHost 192.168.0.34:443&gt;\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
index 99b4392..dbfb00e 100644 (file)
@@ -5,18 +5,22 @@
 </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**
@@ -24,14 +28,9 @@ w=window.open("**InfomationUrlHere**","window1");
 <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>
 
@@ -39,16 +38,6 @@ If your computer does not have Java VM, access
 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>
index 8979fb8..4462b66 100644 (file)
@@ -7,8 +7,8 @@
 
 <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%">
@@ -17,7 +17,7 @@
 </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>
 
@@ -55,7 +55,7 @@ Required Usage Duration: <INPUT TYPE="TEXT" SIZE=3 NAME="duration">minutes(Max 3
 
 <div align=right>July 2005
 
-<br>5th group, Infomation Science, Saga-u</div>
+<br>Saga University</div>
 
 </BODY>
 
index 0d264bd..72b83ea 100644 (file)
@@ -8,18 +8,17 @@
 <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>
 
@@ -58,7 +57,7 @@ Required Usage Duration: <INPUT TYPE="TEXT" SIZE=3 NAME="duration">minutes(Max 3
 
 <div align=right>July 2005
 
-<br>5th group, Infomation Science, Saga-u </div>
+<br>Saga University</div>
 
 
 </BODY>
index 16eff7a..9863f96 100644 (file)
@@ -14,6 +14,6 @@ If you can not move to the page automatically, click the following.
 <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>
diff --git a/opengate/javahtml/index.html.var b/opengate/javahtml/index.html.var
new file mode 100644 (file)
index 0000000..e94de29
--- /dev/null
@@ -0,0 +1,10 @@
+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
index 6e47625..8c71f0c 100644 (file)
@@ -5,18 +5,22 @@
 </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**
@@ -24,28 +28,15 @@ w=window.open("**InfomationUrlHere**","window1");
 <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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$G$-$k$@$1\e(BSSL\e$BBP1~G'>Z$rMxMQ$7$F2<$5$$!#\e(B
 </P>
 
-<P><A HREF="https://%%AUTHCGIURL%%"?ja>SSL\e$BBP1~G'>Z\e(B</A></P>
+<P><A HREF="https://%%AUTHCGIURL%%?ja">SSL\e$BBP1~G'>Z\e(B</A></P>
 
 <P>
 <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>
 
index fad1bdc..bbccc71 100644 (file)
@@ -13,6 +13,6 @@ Opengate\e$B$K$h$k!V%M%C%H%o!<%/MxMQG'>Z!W$N%Z!<%8$X<+F00\F0$7$^$9!#\e(B
 <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>
index 3c653df..d9fffc0 100644 (file)
@@ -4,25 +4,26 @@
 ##########################################################
 
 ### 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}
 
@@ -31,7 +32,7 @@ AUTHCGIPROG = opengateauth.cgi
 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
@@ -43,14 +44,15 @@ AUTHHTMLENSSL = ${HTMLTOP1}${OPENGATEDIR}/en/index-ssl.html
 
 
 ### 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
@@ -108,7 +110,7 @@ HDRS = opengatesrv.h
 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}
@@ -130,7 +132,9 @@ test-comm-ipfw:     ${OBJS} test-comm-ipfw.o
 
 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}
@@ -146,7 +150,7 @@ install-cgi:        ${PROG} ${AUTHPROG}
                cp ${PROG} ${CGIPATH}/${CGIPROG}
                chmod 4755 ${CGIPATH}/${CGIPROG}
                cp ${AUTHPROG} ${CGIPATH}/${AUTHCGIPROG}
-               chmod 4755 ${CGIPATH}/${AUTHCGIPROG}
+               chmod 755 ${CGIPATH}/${AUTHCGIPROG}
                #
 
 
@@ -162,9 +166,14 @@ install-java:
 
 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})
@@ -180,22 +189,24 @@ install-html:
                <../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
                #
 
 
@@ -236,3 +247,5 @@ test-comm-auth.o:   ${HDRS}
 test-comm-ipfw.o:      ${HDRS}
 
 test-comm-java.o:      ${HDRS}
+
+test-cgi.o:    ${HDRS}
index 2576acd..25cbf6a 100644 (file)
@@ -133,7 +133,7 @@ int  main(int argc, char **argv)
   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);
   }
 
@@ -273,7 +273,7 @@ void getMacAddr(void)
         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);
       }
     }
@@ -290,7 +290,7 @@ void getMacAddr(void)
         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);
       }
     }
diff --git a/opengate/opengatesrv/test-cgi.c b/opengate/opengatesrv/test-cgi.c
new file mode 100644 (file)
index 0000000..a06e500
--- /dev/null
@@ -0,0 +1,56 @@
+/**************************************************
+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;
+}