|
Allow/Deny Options and networks for Named/Bind |
|
|
|
|
Written by Eric
|
|
Saturday, 14 March 2009 07:01 |
|
Here is an example of named acl's setup in named.conf. The rfc1918 will deny access from reserved network IPs. The trusted acl is self explanitory. Then after the acls are defined you can use them with options in named.conf.
acl rfc1918 {
0.0.0.0/8;
1.0.0.0/8;
2.0.0.0/8;
192.0.2.0/24;
224.0.0.0/3;
10.0.0.0/8;
172.16.0.0/12;
192.168.0.0/16;
};
acl trusted {
204.8.217.2;
127.0.0.1;
72.249.28.239;
};
options {
directory "/var/named";
version "not available";
allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };
blackhole { rfc1918; };
};
|
|
|
Last Updated on Saturday, 14 March 2009 07:19 |
|
|
Removing ^M (\r) from your cgi scripts |
|
|
|
|
Written by Eric
|
|
Wednesday, 04 February 2009 19:50 |
|
Ever wonder what the easiest way of getting those carriage returns from your cgi script? It doesn't get any easier!
tr -d '\r'< install.cgi > \
newinstall.cgi
|
|
|
Last Updated on Saturday, 14 March 2009 07:21 |
|
What vps does a process belong? |
|
|
|
|
Written by Eric
|
|
Tuesday, 20 January 2009 16:32 |
You have your open vps node with some vps's on there but the load is getting high and you want to see what process belongs to which vps. If you already know the pid from running top or ps on the node then you just run vzpid.
Here is an example. Replace 11055 with the pid you want to check.
This is the output. Pid VEID Name 11055 201 httpd
You can also see what vps is using the highest amount of resources by running this command.
The output will be something like this. CTID LAVERAGE 210 0.00/0.00/0.00 220 0.41/0.26/0.21 230 0.00/0.01/0.00 240 0.00/0.00/0.00 250 0.00/0.00/0.00 260 0.05/0.01/0.00
Then you can enter the vps and do what is needed or even shut down the vps temporarilty.
You can also install vzprocps which will give you the vzps and vztop utilities.
http://download.openvz.org/contrib/utils/
|
|
Last Updated on Tuesday, 20 January 2009 16:50 |
|
|
How do I keep my system clock synced? (NTPD) |
|
|
|
|
Written by Eric
|
|
Thursday, 22 January 2009 05:28 |
|
The best way to keep your system clock synced on a unix server is to use ntpd. Ntpd is a system daemon that will sync with configured time servers and make sure the time doesn't drift.
On a RHEL based system like CentOS or Fedora you would run this command to install ntpd.
On a debian based system like Ubuntu you would run this command to install ntpd.
Now we just need to configure /etc/ntp.conf with time servers.
This is what I am using on my Ubuntu workstation.
server ntp.ubuntu.com server nist1-ny.WiTime.net server time-b.nist.gov server nist1-dc.WiTime.net
Now just start or restart ntpd.
service ntp restart
Now you can see if your server peers are setup.
and at the ntpq> prompt type in peer and press enter.
Note: On CentOS you may need to add ntpd to run level 3 using this command.
|
|
Last Updated on Thursday, 22 January 2009 05:54 |
|
Starting MySQL ERROR! Couldn't find MySQL manager or server |
|
|
|
|
Written by Eric
|
|
Thursday, 15 January 2009 11:58 |
|
You may see this error after upgrading MySQL to 5.x. This is because of an entry in your /etc/my.cnf under [mysql.server] You need to change the basedir to be the correct path or comment out that line and then start up MySQL again. Here is how it looks on my servers. [mysql.server] user=mysql basedir=/usr |
|
Last Updated on Thursday, 15 January 2009 17:23 |
|
|
|
|
<< Start< Prev12Next >End >>
|
|
Page 1 of 2 |