Protected: MikroTik + Freeradius + billing August 20, 2007
Posted by unixgeek in Mikrotik.Enter your password to view comments
Script for useradd August 8, 2007
Posted by unixgeek in Linux System Administartion.add a comment
#!/bin/bash
# Script to add a user to Linux system
#
if [ $(id -u) -eq 0 ]; then
read -p “Enter username : ” username
read -s -p “Enter password : ” password
egrep “^$username” /etc/passwd >/dev/null
if [ $? -eq 0 ]; then
echo “$username exists!”
exit 1
else
pass=$(perl -e ‘print crypt($ARGV[0], “password”)’ $password)
useradd -m -p $pass $username
[ $? -eq 0 ] && echo “User has been added to system!” || echo “Failed
to add
a user!”
fi
else
echo “Only root may add a user to the system”
exit 2
fi
~
~
Protected: Mikrotik Tips: August 7, 2007
Posted by unixgeek in Mikrotik.Enter your password to view comments
Protected: PPPOE server with Mikrotik without Radius August 7, 2007
Posted by unixgeek in Mikrotik.Enter your password to view comments
Protected: Freeradius with Mysql and phpradmin August 5, 2007
Posted by unixgeek in Linux Server Setup.Enter your password to view comments
Protected: Script to Hack server July 29, 2007
Posted by unixgeek in Linux Security and Firewall.Enter your password to view comments
Content based filter as .iso .exe .rar July 29, 2007
Posted by unixgeek in Mikrotik.add a comment
/ip firewall nat
add chain=dstnat protocol=tcp dst-port=80 in-interface=”name of interface” action=redirect to-ports=3128
(3128 or 8080, port of your web proxy server)
Code:
/ ip web-proxy access
add url=”:\\.mp\[3g\]\$” action=deny comment=”" disabled=no
add url=”:\\.wm\[av\]\$” action=deny comment=”" disabled=no
add url=”:\\.avi\$” action=deny comment=”" disabled=no
add url=”:\\.pls\$” action=deny comment=”" disabled=no
add url=”:\\.torrent\$” action=deny comment=”" disabled=no
add url=”:\\.nzb\$” action=deny comment=”" disabled=no
add url=”:\\.exe\$” action=deny comment=”" disabled=no
add url=”:\\.rar\$” action=deny comment=”" disabled=no
add url=”:\\.zip\$” action=deny comment=”" disabled=no
And if you don’t known how to configure web proxy, here you are:
Code:
/ ip web-proxy
set enabled=yes src-address=0.0.0.0 port=3128 hostname=”proxy.domain.com” transparent-proxy=yes \
parent-proxy=0.0.0.0:0 cache-administrator=”webmaster@domain.com” \
max-object-size=4096KiB cache-drive=system max-cache-size=none \
max-ram-cache-size=unlimited
Apache password protected directory July 26, 2007
Posted by unixgeek in Linux Server Setup.comments closed
1. cd /var/www/html/soft
2. vi .htaccess
AuthUserFile /var/www/html/soft/.htpasswd
AuthGroupFile /dev/null
AuthName “Company Private Directory“
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
3. cd /var/www/html/soft
htpasswd -c .htpasswd support
4. vi /etc/httpd/conf/httpd.conf
Scroll down the file and make sure the AllowOverride option is set to All
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
Protected: pemu on Linux July 23, 2007
Posted by unixgeek in Cisco.Enter your password to view comments
Protected: Secondary DNS configuration July 22, 2007
Posted by unixgeek in Linux Server Setup.Enter your password to view comments