<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d17253534\x26blogName\x3dMe+Ordinary+People\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://metabe.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://metabe.blogspot.com/\x26vt\x3d1493338880194554238', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>
Monday, November 03, 2008

################
#!/bin/sh #
#171207 #
#Script Adduser#
################

echo -n “Masukkan Username = “;
read nama
echo -n “Masukkan Nama Lengkap = “;
read namalengkap

echo “Add User”
/usr/sbin/useradd -c”$namalengkap” $nama
echo “Masukkan Password 2x yah..”
/usr/bin/passwd $nama

———————–
#######################
#!/bin/sh #
#171207 #
#Script Add IP Address#
#######################

echo “Example Interface = eth0″;
echo -n “Interface = “;
read interface
echo -n “Masukkan IP Address = “;
read ip
echo -n “Masukkan Subnetmask = “;
read subnetmask
echo -n “Masukkan Default Gateway = “;
read gateway
echo -n “Masukkan DNS Server = “;
read dns

echo “Add IP Address”;
/sbin/ifconfig -a $interface $ip $netmask

echo “Add Default Gateway”;
/sbin/route add default gw $gateway

echo “Add DNS Server”;
echo “nameserver $dns” > /etc/resolv.conf

——————————
##############################
#!/bin/sh #
#171207 #
#Script Add Virtual Interface#
##############################

echo “Example Interface Virtual = eth0:1″;
echo -n “Interface Virtual= “;
read interface
echo -n “Masukkan IP Address = “;
read ip
echo -n “Masukkan Subnetmask = “;
read subnetmask

echo “Add Interface Virtual”
/bin/touch /etc/sysconfig/network-scripts/ifcfg-$interface
echo “DEVICE=$interface” >> /etc/sysconfig/network-scripts/ifcfg-$interface
echo “ONBOOT=yes” >> /etc/sysconfig/network-scripts/ifcfg-$interface
echo “BOOTPROTO=static” >> /etc/sysconfig/network-scripts/ifcfg-$interface
echo “IPADDR=$ip” >> /etc/sysconfig/network-scripts/ifcfg-$interface
echo “NETMASK=$subnetmask” >> /etc/sysconfig/network-scripts/ifcfg-$interface

echo “Restart Service Network”;
/etc/init.d/network restart

———————————–
###################################
#!/bin/sh #
#171207 #
#Script Transparant Proxy #
###################################

echo -n “Masukkan source ‘IP/NETMASK’ =”;
read source
echo -n “Masukkan Destination ‘IP/NETMASK’ =”;
read destination
echo -n “Masukkan Protocol =”;
read protocol
echo -n “Masukkan Destination Port =”;
read dport
echo -n “Masukkan Redirect Port =”;
read redirect

echo “Create redirect rule”

/sbin/iptables -t nat -I PREROUTING -s $source -d $destination -p $protocol –dport $dport -j REDIRECT –to-port $redirect
/sbin/iptables -t nat -I POSTROUTING -s $source -o etho -j MASQUERADE

Labels:

 
posted by -MuHaMaD IqBaL- at 3:20 PM | Permalink |


0 Comments: