August 30, 2010 at 10:36 am
· Filed under Uncategorized
If you have Apache directories that you want only certain IP to be able to access. Say you have a management interface that you only want employees to have access to.
Once you have properly put the fowling code into
/etc/apache2/sites-available/default
and you are not comming from one of the allowed IP you will be greated with a page that says.
Forbidden
You don’t have permission to access /directory/onwebserver/index.php on this server.
Otherwise the normal web page will show up.
<Directory /var/www/super/secret/>
order deny,allow
deny from all
allow from 10.10.0.100 192.168.77.44
</Directory>
Permalink
August 30, 2010 at 10:22 am
· Filed under Unix
In this example I will how you how to force dhcpd to bind to a individual interface, or multiple interfaces. I am using Debian 5 in this example.
From /etc/init.d/dhcp3-server
You will notice this variable $INTERFACES is refrenced but never used anwhere else. It is there for you to tell dhcpd which interface to listen on. You can also add in multiple interfaces there, separated by a space.
INTERFACES=”eth1″
Permalink
August 30, 2010 at 10:17 am
· Filed under Debian, Linux
I just want to share this simple command to show you how to list out all installed packages on a system. It is often useful when you need to compare two system, or easily check to see if you installed a package already.
dpkg –get-selections
server:/var/log/openvpn# dpkg –get-selections
acpi-support-base install
acpid install
adduser install
apache2 install
apache2-mpm-prefork install
apache2-utils install
apache2.2-common install
apt install
… and losts more
This also works on Debian like operating systems like Ubuntu. Below is a example from my Debian desktop.
user@server:~$ dpkg –get-selections|grep xserver
x11-xserver-utils install
xserver-common install
xserver-xorg install
xserver-xorg-core install
xserver-xorg-input-all install
xserver-xorg-input-evdev install
xserver-xorg-input-mouse install
xserver-xorg-input-synaptics install
xserver-xorg-input-vmmouse install
xserver-xorg-input-wacom install
xserver-xorg-video-all install
xserver-xorg-video-apm install
xserver-xorg-video-ark install
xserver-xorg-video-ati install
xserver-xorg-video-chips install
xserver-xorg-video-cirrus install
xserver-xorg-video-fbdev install
xserver-xorg-video-geode install
xserver-xorg-video-i128 install
xserver-xorg-video-i740 install
xserver-xorg-video-intel install
xserver-xorg-video-mach64 install
xserver-xorg-video-mga install
xserver-xorg-video-neomagic install
xserver-xorg-video-nv install
xserver-xorg-video-openchrome install
xserver-xorg-video-r128 install
xserver-xorg-video-radeon install
xserver-xorg-video-rendition install
xserver-xorg-video-s3 install
xserver-xorg-video-s3virge install
xserver-xorg-video-savage install
xserver-xorg-video-siliconmotion install
xserver-xorg-video-sis install
xserver-xorg-video-sisusb install
xserver-xorg-video-tdfx install
xserver-xorg-video-trident install
xserver-xorg-video-tseng install
xserver-xorg-video-v4l install
xserver-xorg-video-vesa install
xserver-xorg-video-vmware install
xserver-xorg-video-voodoo install
Permalink