Install the required software:
yum install dnsmasq
Open up the firewall:
/sbin/iptables -I INPUT -m udp -p udp --dport 67 -j ACCEPT
/sbin/iptables -I INPUT -m udp -p udp --dport 53 -j ACCEPT
dnsmasq -d --interface=br0 --dhcp-range=220.127.116.11,static --dhcp-host=84:2b:2b:78:30:79,18.104.22.168 --dhcp-option=option:router,22.214.171.124 --dhcp-boot=pxelinux.0 --enable-tftp --tftp-root=/var/ftpd
Put all required files, such as pxelinux.0 from the package syslinux in /var/ftpd
Ubuntu/DebianI'm running RedHat-based software on all of my machines. Above information may be useful for Ubuntu/Debian users, but it's not tested and I'm not supporting it.
Servers: RedHat Enterprise Linux/CentOS is more suitable for servers, as there's a lot of professional level support available. I think that's important, because if I say, get a car accident, I want the servers to be managable by another professional.
Desktops/Laptops: RPM packages are pretty exchangable between RedHat-based platforms. That's a good reason to run Fedora on the desktop.© GeekLabInfo
PXEboot with CentOS 5.6 and dnsmasq is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
This night, some scriptkiddie decided it'd be fun to overload one of my servers by bruteforcing the FTP. The FTP server taking 90% of the CPU made the whole server slow. Especially the Postfix mailserver experienced a huge delay.
Anyway, I just firewalled out the scriptkiddie and Postfix could start processing the queue. But for some reason, it delivered no more than 5-10 mails a second. That would mean that processing the queue of 18.000 mails would take 30-60 minutes.
I've tried to figure out why Postfix was so slow before. Without any luck. Using the well known tuning pages didn't help me at all. Today, I opened up /usr/bin/top, to see that the system was doing a lot of I/O. I accidently found out why: I like to have syslog write *.* to /var/log/allmessages.
This simple rule caused so much extra I/O, that postfix was slowed down 90%. After disabling "allmessages" performance went up, and the queue was processed within minutes. Makes me wonder what happens if I...
- disable logging at all, which is a bad idea as you can no longer spot abuse
- find a way to enable write-cache - the default syslog of CentOS 5 does not support this AFAIK
- write logs to another device
Syslog kills Postfix performance is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info