CentOS: Alias IP Ranges

VMware Virtual Machine Hosting

cd /etc/sysconfig/network-scripts

Quick and easy range of ips:

Add this file: ifcfg-eth0-range0

Contents:

IPADDR_START= 11.xxx.xxx.xxx
IPADDR_END= 11.xxx.xxx.xxx
CLONENUM_START=0

If you want to add another range:

Add this file: ifcfg-eth0-range1

IPADDR_START=10.xxx.xxx.xxx
IPADDR_END=10.xxx.xxx.xxx
CLONENUM_START=11

Pay close attention to CLONENUM_START. In the second range it must be a number higher than the amount of IPs adding in range0. For instance, lets say your range was: 10.10.10.1 -thru-> 10.10.10.10. That is 10 IPs, so your CLONENUM-START would be 11 in the second range file.

VMware Virtual Machine Hosting

FreeBSD: Proper buildworld technique

VMware Virtual Machine Hosting

Follow all these steps in this exact order…this is from hard-won experience!!!

1. cvsup the correct /usr/src – example cvsup files can usually be found in /root/sup. Normally we follow the security releases e.g. RELENG 6_2 rather than stable e.g. RELENG_6
2. read /usr/src/UPDATING to make sure nothing bad is going to happen.
3. rm -rf /usr/obj or weird bad shit can happen. This is #1 cause of failed installworlds.
4. check /etc/make.conf is sensible…usually it is but for a new box it won’t be.
5. mergemaster -p – otherwise installworld can fail with new users and groups, or worse it doesn’t boot.
6. make -j16 buildworld
7. check kernel config file, usually you can use the one from the previous release, not always. Using WWW here.
8. make buildkernel KERNCONF=WWW
9. make installkernel KERNCONF=WWW
10. [OPTIONAL] reboot to see if the kernel is OK. This is a 2-edged sword, because if you don’t do it, you are screwed if there is a problem with the kernel and you’ve already done installworld. If you do it, the kernel comes up incompatible with userland, and in the worst case, tcp/ip is broken!
11. make installworld
12. mergemaster – take care not to overwrite /etc/ssh/sshd_config and lock yourself out of the box!
13. reboot and pray to the FSM!

VMware Virtual Machine Hosting

Routing Hackers To /dev/null (Blackhole)

Add: route add -host attacker_ip 127.0.0.1 -blackhole
Remove: route delete -host attacker_ip 127.0.0.1 -blackhole

The above will route all traffic from the “attacker_ip” to a blackhole.

This is useful when you see someone relentlessly attacking any daemon on your server (ssh, http, ftp, etc).

[ad#Google Adsense]