never stop questioning

dni.07.html

dni.07.html
Posted Aug 17, 1999

dni.07.html

tags | tool, firewall
systems | unix
MD5 | b193ace3b93c35874f3bd0dcbaac5086

dni.07.html

Change Mirror Download
<HTML>
<HEAD>
<SCRIPT LANGUAGE='JavaScript'>
x=new Array(
['Time','TIME',37,0,0],
['Echo','ECHO',7,0,0],
['File Transfer Protocol Control','ftp',21,0,2],
['SSH Remote Login Protocol','ssh',22,0,0],
['Telnet','TELNET',23,0,2],
['Simple Mail Transfer Protocol','SMTP',25,0,2],
['Domain Name Server','DOMAIN',53,0,0],
['Trivial File Transfer Protocol','TFTP',69,2,0],
['Finger','FINGER',79,0,2],
['World Wide Web HTTP','http',80,0,2],
['Post Office Protocol v2','POP2',109,0,2],
['Post Office Protocol v3','POP3',110,0,2],
['Authentication Service','auth',113,0,2],
['Network News Transfer Protocol','nntp',119,0,2],
['Internet Relay Chat Protocol','irc',194,0,0],
['World Wide Web HTTP secure','https',443,0,2],
['Remote process execution','exec',512,0,2],
['Remote login a la telnet','login',513,0,2],
['BSD talkd','talk',517,2,0],
['SunOs talkd','ntalk',518,2,0],
['ICQ traffic','4000',4000,0,0],
['Open Windows traffic','2000',2000,0,2],
['NFS traffic','2049',2049,0,2]);
x=x.sort();

l=new Array();
l[0]=new Array();
v=new Array();
v[0]=new Array(0,0,0);


n=new Array();
n[0]=new Array();

for (i =0; i < x.length; i ++)
{
n[0][i]=new Array(5);
for (s =0; s < 5; s ++) n[0][i][s]=x[i][s];
}

function CheckAll () {
sw = window.open("", "script");
with (sw.document) {
open();
clear();
d = new Date();
writeln('<P>#!/bin/sh');
writeln('<P>PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin');
writeln('<BR>export PATH');
p = '<BR>&nbsp;&nbsp;&nbsp;';
writeln(p + '<BR>echo');
writeln(p + 'echo " $0: IP Filtering Firewall script for dial-up users."');
writeln(p + 'echo " $0: Generated by DNi at '+d.toGMTString()+'"');
writeln(p + 'echo');
writeln(p + 'echo " DNi v0.7, 20 October 1998"');
writeln(p + 'echo " Rostislav V. Belotserkovski, robel@usa.net"');
writeln(p + 'echo');
writeln(p + 'echo " DNi Home Page: http://members.tripod.com/~robel/dni/"');
writeln(p + '<BR># Some definitions for easy maintenance.');
writeln('<P># Representing an IP firewall administration programs location.');
writeln('<BR>FW=' + document.forma.elements['ipfwadm'].value);
writeln('<P>&nbsp;&nbsp;&nbsp;case "$1" in');
writeln(p + 'start)');
writeln(p + 'echo " Starting IP Filtering Firewall script" | tee /dev/console | logger');
writeln('<P># Representing an assigned IP address.');
writeln('<BR>IP_ADDRESS=`ifconfig | grep "inet addr" | grep -v "127.0.0.1" \\<BR>| awk '{print $2;}' | awk -F':' '{print $2;}'`');
writeln('<P>if (test -z $IP_ADDRESS) then');
writeln('<BR>echo');
writeln('<BR>echo ERROR: Please connect first !!!');
writeln('<BR>echo');
writeln('<BR>exit 0;');
writeln('<BR>fi;');
writeln('<P># Representing external interface.');
writeln('<BR>EXTERNAL_INTERFACE=' + document.forma.elements['ppp0'].value);
writeln('<P># Representing loopback interface.');
writeln('<BR>LOOPBACK_INTERFACE=' + document.forma.elements['lo'].value);
writeln('<P># Flush IP firewall rules.');
writeln('<BR>for i in I F O');
writeln('<BR>do');
writeln('<BR> $FW -$i -f');
writeln('<BR> $FW -$i -p accept');
writeln('<BR>done');
writeln('<BR> $FW -I -p deny');

writeln('<P># Unlimited traffic on the loopback interface.');
writeln('<BR>$FW -I -a accept -W $LOOPBACK_INTERFACE');
writeln('<P># Accept return tcp & udp traffic.');
writeln('<BR>$FW -I -a accept -P tcp -k -W $EXTERNAL_INTERFACE');
writeln('<BR>$FW -I -a accept -P udp -k -W $EXTERNAL_INTERFACE');

writeln('<P># '+document.forma.p_spoof.options[document.forma.p_spoof.selectedIndex].text+' packets claiming to be from the external interface.');
writeln('<BR>$FW -I -a '+document.forma.p_spoof.options[document.forma.p_spoof.selectedIndex].text.toLowerCase()+' -o -W $EXTERNAL_INTERFACE -S $IP_ADDRESS');
writeln('<P># '+document.forma.p_spoof.options[document.forma.p_spoof.selectedIndex].text+' packets claiming to be from a loopback interface,<BR># Class A, C and B private networks.');
writeln('<BR>for i in 127.0.0.1/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16');
writeln('<BR>do');
writeln('<BR> $FW -I -a '+document.forma.p_spoof.options[document.forma.p_spoof.selectedIndex].text.toLowerCase()+' -o -W $EXTERNAL_INTERFACE -S $i');
writeln('<BR>done');

for (k =l.length-1; k >= 0; k --) if ((v[k][0]==0) || (v[k][0]==1)) {
writeln('<P># Allow ftp-data');
writeln('<BR> $FW -I -a accept -P tcp -W $EXTERNAL_INTERFACE \\<BR>-S any/0 20 -D $IP_ADDRESS 1024:65535');
break;
}
for (k =l.length-1; k >= 0; k --)
{

f_tcp_acc=new Array();
f_tcp_den=new Array();
f_tcp_rej=new Array();
f_udp_acc=new Array();
f_udp_den=new Array();
f_udp_rej=new Array();
for (i =0; i < l[k].length; i ++)
{
if (v[k][0]==0)
{
if (l[k][i][3]==0) f_tcp_acc[f_tcp_acc.length]=l[k][i][2];
if (l[k][i][3]==1) f_tcp_rej[f_tcp_rej.length]=l[k][i][2];
}
if (v[k][0]==1)
{
if (l[k][i][3]==0) f_tcp_acc[f_tcp_acc.length]=l[k][i][2];
if (l[k][i][3]==1) f_tcp_den[f_tcp_den.length]=l[k][i][2];
}
if (v[k][0]==2)
{
if (l[k][i][3]==0) f_tcp_den[f_tcp_den.length]=l[k][i][2];
if (l[k][i][3]==1) f_tcp_rej[f_tcp_rej.length]=l[k][i][2];
}
if (v[k][1]==0)
{
if (l[k][i][4]==0) f_udp_acc[f_udp_acc.length]=l[k][i][2];
if (l[k][i][4]==1) f_udp_rej[f_udp_rej.length]=l[k][i][2];
}
if (v[k][1]==1)
{
if (l[k][i][4]==0) f_udp_acc[f_udp_acc.length]=l[k][i][2];
if (l[k][i][4]==1) f_udp_den[f_udp_den.length]=l[k][i][2];
}
if (v[k][1]==2)
{
if (l[k][i][4]==0) f_udp_den[f_udp_den.length]=l[k][i][2];
if (l[k][i][4]==1) f_udp_rej[f_udp_rej.length]=l[k][i][2];
}
}
writeln('<P># --start-- Access to local services from "'+document.forma.list1[k].text+'"');
h=document.forma.list1[k].text;
if (k==0) h="any/0";

if (f_tcp_acc.length !=0 ) writeln('<P># Accept tcp traffic from "'+document.forma.list1[k].text+'"');
if (f_tcp_acc.length !=0 ) for (e =0; e < f_tcp_acc.length; e +=8) writeln('<BR>$FW -I -a accept -P tcp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_tcp_acc.slice(e,e+8).join(' \\<BR>'));
if (f_tcp_den.length !=0 ) writeln('<P># Deny tcp traffic from "'+document.forma.list1[k].text+'"');
if (f_tcp_den.length !=0 ) for (e =0; e < f_tcp_den.length; e +=8) writeln('<BR>$FW -I -a deny -P tcp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_tcp_den.slice(e,e+8).join(' \\<BR>'));
if (f_tcp_rej.length !=0 ) writeln('<P># Reject tcp traffic from "'+document.forma.list1[k].text+'"');
if (f_tcp_rej.length !=0 ) for (e =0; e < f_tcp_rej.length; e +=8) writeln('<BR>$FW -I -a reject -P tcp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_tcp_rej.slice(e,e+8).join(' \\<BR>'));
if (f_udp_acc.length !=0 ) writeln('<P># Accept udp traffic from "'+document.forma.list1[k].text+'"');
if (f_udp_acc.length !=0 ) for (e =0; e < f_udp_acc.length; e +=8) writeln('<BR>$FW -I -a accept -P udp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_udp_acc.slice(e,e+8).join(' \\<BR>'));
if (f_udp_den.length !=0 ) writeln('<P># Deny udp traffic from "'+document.forma.list1[k].text+'"');
if (f_udp_den.length !=0 ) for (e =0; e < f_udp_den.length; e +=8) writeln('<BR>$FW -I -a deny -P udp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_udp_den.slice(e,e+8).join(' \\<BR>'));
if (f_udp_rej.length !=0 ) writeln('<P># Reject udp traffic from "'+document.forma.list1[k].text+'"');
if (f_udp_rej.length !=0 ) for (e =0; e < f_udp_rej.length; e +=8) writeln('<BR>$FW -I -a reject -P udp -W $EXTERNAL_INTERFACE \\<BR>-S '+h+' 1024:65535 -D $IP_ADDRESS \\<BR>'+f_udp_rej.slice(e,e+8).join(' \\<BR>'));

h=' -S '+document.forma.list1[k].text;
if (k==0) h=" -S any/0";

if (v[k][2] !=2 ) writeln('<BR>$FW -I -a accept -P icmp -W $EXTERNAL_INTERFACE'+h+' 0 3 11');
if (k==0) h="";
if ((v[k][0]==v[k][1]) && (v[k][0]==v[k][2]))
{
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][0]].text.toLowerCase()+' -W $EXTERNAL_INTERFACE'+h);
if (v[k][0]!=2) writeln(' -o');
}
else
{
if (v[k][0]==v[k][1]){
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][2]].text.toLowerCase()+' -P icmp -W $EXTERNAL_INTERFACE'+h);
if (v[k][2]!=2) writeln(' -o');
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][0]].text.toLowerCase()+' -W $EXTERNAL_INTERFACE'+h);
if (v[k][0]!=2) writeln(' -o');
}
if (v[k][1]==v[k][2]){
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][0]].text.toLowerCase()+' -P tcp -W $EXTERNAL_INTERFACE'+h);
if (v[k][0]!=2) writeln(' -o');
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][1]].text.toLowerCase()+' -W $EXTERNAL_INTERFACE'+h);
if (v[k][1]!=2) writeln(' -o');
}
if (v[k][0]==v[k][2]){
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][1]].text.toLowerCase()+' -P udp -W $EXTERNAL_INTERFACE'+h);
if (v[k][1]!=2) writeln(' -o');
writeln('<BR>$FW -I -a '+document.forma.p_tcp.options[v[k][0]].text.toLowerCase()+' -W $EXTERNAL_INTERFACE'+h);
if (v[k][0]!=2) writeln(' -o');
}
}
writeln('<P># --end---- Access to local services from "'+document.forma.list1[k].text+'"');

}

writeln('<P>&nbsp;&nbsp;&nbsp;echo');
writeln(p + ';;');
writeln(p + 'stop)');
writeln(p + 'echo " Shutting down IP Filtering Firewall script" | \\<BR>tee /dev/console | logger');
writeln('<BR>for i in I F O');
writeln('<BR>do');
writeln('<BR> $FW -$i -f');
writeln('<BR> $FW -$i -p accept');
writeln('<BR>done');
writeln('<P>&nbsp;&nbsp;&nbsp;echo');
writeln(p + ';;');
writeln(p + '*)');
writeln(p + 'echo " Usage: $0 {start|stop}"');
writeln(p + 'echo');
writeln(p + ';;');
writeln(p + 'esac');
writeln(p + 'echo " Current policy: "');
writeln(p + 'echo');
writeln('<BR>$FW -I -le');
writeln('<BR>$FW -O -le');
writeln('<BR>$FW -F -le');
writeln(p + 'echo');
writeln(p + 'exit 0');
close();
};
alert('COPY AND PASTE THIS TEXT TO A FILE AND RUN:\nchown root:root FILENAME\nchmod 750 FILENAME\n\n P L E A S E C H E C K Y O U R E N C O D I N G !\n\n\n\n\nThank you for using DNi');
};

function change_tcp3_udp3()
{
document.forma.tcp3.selectedIndex=l[document.forma.list1.selectedIndex][document.forma.des3.selectedIndex][3];
document.forma.udp3.selectedIndex=l[document.forma.list1.selectedIndex][document.forma.des3.selectedIndex][4];
}

function c_des3()
{
document.forma.nam3.selectedIndex=document.forma.des3.selectedIndex;
document.forma.num3.selectedIndex=document.forma.des3.selectedIndex;

change_tcp3_udp3();
}

function c_nam3()
{
document.forma.des3.selectedIndex=document.forma.nam3.selectedIndex;
document.forma.num3.selectedIndex=document.forma.nam3.selectedIndex;

change_tcp3_udp3();}

function c_num3()
{
document.forma.des3.selectedIndex=document.forma.num3.selectedIndex;
document.forma.nam3.selectedIndex=document.forma.num3.selectedIndex;

change_tcp3_udp3();
}

function c_tcp()
{
if ((document.forma.tcp.selectedIndex==2) && (document.forma.udp.selectedIndex==2))
{
document.forma.tcp.selectedIndex=0;
alert('Please check policy !');
}
}

function c_udp()
{
if ((document.forma.tcp.selectedIndex==2) && (document.forma.udp.selectedIndex==2))
{
document.forma.udp.selectedIndex=0;
alert('Please check policy !');
}
}


function c_tcp4()
{
if ((document.forma.tcp4.selectedIndex==2) && (document.forma.udp4.selectedIndex==2))
{
document.forma.tcp4.selectedIndex=0;
alert('Please check policy !');
}
}

function c_udp4()
{
if ((document.forma.tcp4.selectedIndex==2) && (document.forma.udp4.selectedIndex==2))
{
document.forma.udp4.selectedIndex=0;
alert('Please check policy !');
}
}

function c_tcp3()
{
if ((document.forma.tcp3.selectedIndex==2) && (document.forma.udp3.selectedIndex==2))
{
document.forma.tcp3.selectedIndex=0;
alert('Please check policy !');
return;
}
l[document.forma.list1.selectedIndex][document.forma.des3.selectedIndex][3]=document.forma.tcp3.selectedIndex;
}

function c_udp3()
{
if ((document.forma.tcp3.selectedIndex==2) && (document.forma.udp3.selectedIndex==2))
{
document.forma.udp3.selectedIndex=0;
alert('Please check policy !');
return;
}
l[document.forma.list1.selectedIndex][document.forma.des3.selectedIndex][4]=document.forma.udp3.selectedIndex;
}


function change_tcp_udp()
{
document.forma.tcp.selectedIndex=n[document.forma.list1.selectedIndex][document.forma.des.selectedIndex][3];
document.forma.udp.selectedIndex=n[document.forma.list1.selectedIndex][document.forma.des.selectedIndex][4];
}

function c_des()
{
document.forma.nam.selectedIndex=document.forma.des.selectedIndex;
document.forma.num.selectedIndex=document.forma.des.selectedIndex;
change_tcp_udp();
}

function c_nam()
{
document.forma.des.selectedIndex=document.forma.nam.selectedIndex;
document.forma.num.selectedIndex=document.forma.nam.selectedIndex;
change_tcp_udp();
}

function c_num()
{
document.forma.des.selectedIndex=document.forma.num.selectedIndex;
document.forma.nam.selectedIndex=document.forma.num.selectedIndex;
change_tcp_udp()
}

function c_list1()
{
document.forma.p_tcp.selectedIndex=v[document.forma.list1.selectedIndex][0];
document.forma.p_udp.selectedIndex=v[document.forma.list1.selectedIndex][1];
document.forma.p_icmp.selectedIndex=v[document.forma.list1.selectedIndex][2];
if (document.forma.p_tcp.selectedIndex==0) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_tcp.selectedIndex==1) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Deny";}
if (document.forma.p_tcp.selectedIndex==2) {document.forma.tcp4.options[0].text="Deny"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==0) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==1) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Deny";}
if (document.forma.p_udp.selectedIndex==2) {document.forma.udp4.options[0].text="Deny"; document.forma.udp4.options[1].text="Reject";}
rewrt_n();
rewrt_l();
}

function remove_n()
{
for (i =document.forma.des.selectedIndex; i < n[document.forma.list1.selectedIndex].length-1; i ++)
{
n[document.forma.list1.selectedIndex][i]=n[document.forma.list1.selectedIndex][i+1];
}
n[document.forma.list1.selectedIndex].length-=1;
}

function remove_l()
{
for (i =document.forma.des3.selectedIndex; i < l[document.forma.list1.selectedIndex].length-1; i ++)
{
l[document.forma.list1.selectedIndex][i]=l[document.forma.list1.selectedIndex][i+1];
}
l[document.forma.list1.selectedIndex].length-=1;
}


function rewrt_n()
{
document.forma.des.length=n[document.forma.list1.selectedIndex].length;
document.forma.nam.length=n[document.forma.list1.selectedIndex].length;
document.forma.num.length=n[document.forma.list1.selectedIndex].length;
for (i =0; i < n[document.forma.list1.selectedIndex].length; i ++)
{
document.forma.des.options[i].text=n[document.forma.list1.selectedIndex][i][0];
document.forma.nam.options[i].text=n[document.forma.list1.selectedIndex][i][1].toLowerCase();
document.forma.num.options[i].text=n[document.forma.list1.selectedIndex][i][2];
}
i-=1;
if (n[document.forma.list1.selectedIndex].length==0) {document.forma.tcp.length=0;document.forma.udp.length=0;return;}
document.forma.tcp.length=3;
document.forma.udp.length=3;
document.forma.p_tcp.selectedIndex=v[document.forma.list1.selectedIndex][0];
document.forma.p_udp.selectedIndex=v[document.forma.list1.selectedIndex][1];
document.forma.p_icmp.selectedIndex=v[document.forma.list1.selectedIndex][2];
if (document.forma.p_tcp.selectedIndex==0) {document.forma.tcp.options[0].text="Accept"; document.forma.tcp.options[1].text="Reject";}
if (document.forma.p_tcp.selectedIndex==1) {document.forma.tcp.options[0].text="Accept"; document.forma.tcp.options[1].text="Deny";}
if (document.forma.p_tcp.selectedIndex==2) {document.forma.tcp.options[0].text="Deny"; document.forma.tcp.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==0) {document.forma.udp.options[0].text="Accept"; document.forma.udp.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==1) {document.forma.udp.options[0].text="Accept"; document.forma.udp.options[1].text="Deny";}
if (document.forma.p_udp.selectedIndex==2) {document.forma.udp.options[0].text="Deny"; document.forma.udp.options[1].text="Reject";}
document.forma.tcp.options[2].text="Ignore";
document.forma.udp.options[2].text="Ignore";
document.forma.des.selectedIndex=0;
document.forma.nam.selectedIndex=0;
document.forma.num.selectedIndex=0;
document.forma.tcp.selectedIndex =n[document.forma.list1.selectedIndex][0][3];
document.forma.udp.selectedIndex =n[document.forma.list1.selectedIndex][0][4];
}

function rewrt_l()
{
document.forma.des3.length=l[document.forma.list1.selectedIndex].length;
document.forma.nam3.length=l[document.forma.list1.selectedIndex].length;
document.forma.num3.length=l[document.forma.list1.selectedIndex].length;
for (i =0; i < l[document.forma.list1.selectedIndex].length; i ++)
{
document.forma.des3.options[i].text=l[document.forma.list1.selectedIndex][i][0];
document.forma.nam3.options[i].text=l[document.forma.list1.selectedIndex][i][1].toLowerCase();
document.forma.num3.options[i].text=l[document.forma.list1.selectedIndex][i][2].toLowerCase();
}
i-=1;
if (l[document.forma.list1.selectedIndex].length==0) {document.forma.tcp3.length=0;document.forma.udp3.length=0;return;}
document.forma.tcp3.length=3;
document.forma.udp3.length=3;
if (document.forma.p_tcp.selectedIndex==0) {document.forma.tcp3.options[0].text="Accept"; document.forma.tcp3.options[1].text="Reject";}
if (document.forma.p_tcp.selectedIndex==1) {document.forma.tcp3.options[0].text="Accept"; document.forma.tcp3.options[1].text="Deny";}
if (document.forma.p_tcp.selectedIndex==2) {document.forma.tcp3.options[0].text="Deny"; document.forma.tcp3.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==0) {document.forma.udp3.options[0].text="Accept"; document.forma.udp3.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==1) {document.forma.udp3.options[0].text="Accept"; document.forma.udp3.options[1].text="Deny";}
if (document.forma.p_udp.selectedIndex==2) {document.forma.udp3.options[0].text="Deny"; document.forma.udp3.options[1].text="Reject";}
document.forma.tcp3.options[2].text="Ignore";
document.forma.udp3.options[2].text="Ignore";
document.forma.des3.selectedIndex=0;
document.forma.nam3.selectedIndex=0;
document.forma.num3.selectedIndex=0;
document.forma.tcp3.selectedIndex =l[document.forma.list1.selectedIndex][0][3];
document.forma.udp3.selectedIndex =l[document.forma.list1.selectedIndex][0][4];

}


function add(a)
{
if ((document.forma.nam4.value != "") || (document.forma.num4.value != ""))
{
if (document.forma.nam4.value=="") document.forma.nam4.value=document.forma.num4.value;
if (document.forma.num4.value=="") document.forma.num4.value=document.forma.nam4.value;
if (document.forma.des4.value=="") document.forma.des4.value=document.forma.nam4.value;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length]=new Array(5);
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][0]=document.forma.des4.value;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][1]=document.forma.nam4.value;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][2]=document.forma.num4.value;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][3]=document.forma.tcp4.selectedIndex;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][4]=document.forma.udp4.selectedIndex;
if (a.name=="p_nam" ) {l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][5]=0}
else {l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][5]=1};
l[document.forma.list1.selectedIndex]=l[document.forma.list1.selectedIndex].sort();
rewrt_l();
document.forma.tcp4.selectedIndex=0;
document.forma.udp4.selectedIndex=0;
document.forma.des4.value="";
document.forma.nam4.value="";
document.forma.num4.value="";
return;
}
if (document.forma.des.length <= 0) return;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length]=new Array(6);
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][0]=document.forma.des.options[document.forma.des.selectedIndex].text;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][1]=document.forma.nam.options[document.forma.nam.selectedIndex].text;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][2]=document.forma.num.options[document.forma.num.selectedIndex].text;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][3]=document.forma.tcp.selectedIndex;
l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][4]=document.forma.udp.selectedIndex;
if (a.name=="p_nam" ) {l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][5]=0}
else {l[document.forma.list1.selectedIndex][l[document.forma.list1.selectedIndex].length-1][5]=1};
l[document.forma.list1.selectedIndex]=l[document.forma.list1.selectedIndex].sort();
rewrt_l();
remove_n();
rewrt_n();
}

function remove_port()
{
if (document.forma.des3.length <= 0) return;
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length]=new Array(5);
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length-1][0]=document.forma.des3.options[document.forma.des3.selectedIndex].text;
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length-1][1]=document.forma.nam3.options[document.forma.nam3.selectedIndex].text;
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length-1][2]=document.forma.num3.options[document.forma.num3.selectedIndex].text;
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length-1][3]=document.forma.tcp3.selectedIndex;
n[document.forma.list1.selectedIndex][n[document.forma.list1.selectedIndex].length-1][4]=document.forma.udp3.selectedIndex;
n[document.forma.list1.selectedIndex]=n[document.forma.list1.selectedIndex].sort();
rewrt_n();
remove_l();
rewrt_l();
}


function add_h()
{
if (document.forma.host.value=="") return;
document.forma.list1.length += 1;
document.forma.list1.options[document.forma.list1.length-1].text=document.forma.host.value;
document.forma.list1.selectedIndex=document.forma.list1.length-1;
document.forma.host.value="";
document.forma.p_tcp.selectedIndex=0;
document.forma.p_udp.selectedIndex=0;
document.forma.p_icmp.selectedIndex=0;
v[document.forma.list1.selectedIndex]=new Array(0,0,0);
n[document.forma.list1.selectedIndex]=new Array();
l[document.forma.list1.selectedIndex]=new Array();
for (i =0; i < x.length; i ++)
{
n[document.forma.list1.selectedIndex][i]=new Array(5);
for (s =0; s < 5; s ++) n[document.forma.list1.selectedIndex][i][s]=x[i][s];
}
rewrt_n();
rewrt_l();
}

function remove_h()
{
if (document.forma.list1.selectedIndex==0) return;
for (i =document.forma.list1.selectedIndex; i < document.forma.list1.length-1; i ++)
{
document.forma.list1.options[i].text=document.forma.list1.options[i+1].text;
v[i]=v[i+1];
n[i]=n[i+1];
l[i]=l[i+1];
}
document.forma.list1.length -= 1;
document.forma.list1.selectedIndex=document.forma.list1.length-1;
v.length-=1;
n.length-=1;
l.length-=1;
rewrt_n();
rewrt_l();
}

function cp_tcp()
{
v[document.forma.list1.selectedIndex][0]=document.forma.p_tcp.selectedIndex;
for (i =0; i < x.length; i ++)
{
n[document.forma.list1.selectedIndex][i]=new Array(5);
for (s =0; s < 5; s ++) n[document.forma.list1.selectedIndex][i][s]=x[i][s];
}
l[document.forma.list1.selectedIndex].length=0;
rewrt_n();
rewrt_l();
if (document.forma.p_tcp.selectedIndex==0) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_tcp.selectedIndex==1) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Deny";}
if (document.forma.p_tcp.selectedIndex==2) {document.forma.tcp4.options[0].text="Deny"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==0) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==1) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Deny";}
if (document.forma.p_udp.selectedIndex==2) {document.forma.udp4.options[0].text="Deny"; document.forma.udp4.options[1].text="Reject";}
}

function cp_udp()
{
v[document.forma.list1.selectedIndex][1]=document.forma.p_udp.selectedIndex;
for (i =0; i < x.length; i ++)
{
n[document.forma.list1.selectedIndex][i]=new Array(5);
for (s =0; s < 5; s ++) n[document.forma.list1.selectedIndex][i][s]=x[i][s];
}
l[document.forma.list1.selectedIndex].length=0;
rewrt_n();
rewrt_l();
if (document.forma.p_tcp.selectedIndex==0) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_tcp.selectedIndex==1) {document.forma.tcp4.options[0].text="Accept"; document.forma.tcp4.options[1].text="Deny";}
if (document.forma.p_tcp.selectedIndex==2) {document.forma.tcp4.options[0].text="Deny"; document.forma.tcp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==0) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Reject";}
if (document.forma.p_udp.selectedIndex==1) {document.forma.udp4.options[0].text="Accept"; document.forma.udp4.options[1].text="Deny";}
if (document.forma.p_udp.selectedIndex==2) {document.forma.udp4.options[0].text="Deny"; document.forma.udp4.options[1].text="Reject";}
}

function cp_icmp()
{
v[document.forma.list1.selectedIndex][2]=document.forma.p_icmp.selectedIndex;
}

</SCRIPT>

<TITLE>DNi v0.7</TITLE>
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#CC0000" ALINK="#FF0000">
<center>
<B><FONT FACE="Arial,Helvetica" size=+2>Dear Internet community member, hi and welcome to:<BR>DNi v0.7<BR>by <A HREF="mailto:robel@usa.net">robel@usa.net</A></font></B>
<P>
<FORM NAME='forma'>
<TABLE BORDER NOSAVE>
<TR ALIGN=right><TD>Representing an IP firewall administration programs location : <INPUT TYPE=text name=ipfwadm value=/sbin/ipfwadm></TD></TR>
<TR ALIGN=right><TD>Representing external interface : <INPUT TYPE=text name=ppp0 value=ppp0></TD></TR>
<TR ALIGN=right><TD>Representing loopback interface : <INPUT TYPE=text name=lo value=lo></TD></TR>
</TABLE>
<P>


<TABLE BORDER NOSAVE>
<TR align="center">
<TD>inspect incoming<BR>traffic from:
</TD>
<TD>protocol/<BR>traffic
</TD>
<TD>policy apply on<BR>any connection
</TD>
</TR>

<TR>
<TD rowspan=4>
<select name=list1 onchange=c_list1()><option>any host or network</select><P>
<INPUT TYPE=button value="remove :" onclick=remove_h()><P>
<INPUT TYPE=button value="add :" onclick=add_h()> <INPUT TYPE=text size=15 name=host>
</TD>
<TD>TCP</TD>
<TD><select name=p_tcp onchange=cp_tcp()><option>Deny<option>Reject<option>Accept</select></TD>
</TR>

<TR>
<TD>UDP</TD>
<TD><select name=p_udp onchange=cp_udp()><option>Deny<option>Reject<option>Accept</select></TD>
</TR>

<TR>
<TD>ICMP</TD>
<TD><select name=p_icmp onchange=cp_icmp()><option>Deny<option>Reject<option>Accept</select></TD>
</TR>

<TR>
<TD>Spoofed</TD>
<TD><select name=p_spoof><option>Deny<option>Reject</select></TD>
</TR>
</TABLE>
<P>

<TABLE BORDER NOSAVE >
<TR align="center">
<TD>service description</TD>
<TD colspan=2><INPUT TYPE=button name=p_num value="add service" onclick=add(this)></TD>
<TD>TCP</TD>
<TD>UDP</TD>
</TR>
<TR>
<TD><select name=des onchange=c_des()><option>1234567890123456789012345555</select></TD>
<TD><select name=nam onchange=c_nam()><option>123456</select></TD>
<TD><select name=num onchange=c_num()><option>1024</select></TD>
<TD><select name=tcp onchange=c_tcp()><option>Accept</select></TD>
<TD><select name=udp onchange=c_udp()><option>Accept</select></TD>
</TR>
<TR NOSAVE>
<TD><INPUT TYPE=TEXT name=des4></TD>
<TD><INPUT TYPE=TEXT name=nam4 size=6></TD>
<TD><INPUT TYPE=TEXT name=num4 size=5></TD>
<TD><select name=tcp4 onchange=c_tcp4()><option>Accept<option>Reject<option>Ignore</select></TD>
<TD><select name=udp4 onchange=c_udp4()><option>Accept<option>Reject<option>Ignore</select></TD>
</TR>
<TR NOSAVE align="center">
<TD>service description</TD>
<TD colspan=2><INPUT TYPE=button value="remove service" onclick=remove_port()></TD>
<TD>TCP</TD>
<TD>UDP</TD>
</TR>
<TR NOSAVE>
<TD><select name=des3 onchange=c_des3()><option></select></TD>
<TD><select name=nam3 onchange=c_nam3()><option>123456</select></TD>
<TD><select name=num3 onchange=c_num3()><option>1024</select></TD>
<TD><select name=tcp3 onchange=c_tcp3()><option>Accept</select></TD>
<TD><select name=udp3 onchange=c_udp3()><option>Accept</select></TD>
</TR>
</TABLE>
</FORM>

<SCRIPT LANGUAGE='JavaScript'>
rewrt_n();
rewrt_l();

</script>
<P><A HREF='javascript:CheckAll()'>Generate script</A>
<P><P><P>
<A HREF="http://members.tripod.com/~robel/dni/index.html">Donwload DNi v0.7 source</A>
<P><P><P>
<A HREF="http://members.tripod.com/~robel/dni/dni06.html">DNi v0.6 moved here</A>
<P><P><P>

</CENTER>
</BODY>
</HTML>

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close