Skip to main content

Posts

Welcome to the new home of www.joe-ma.co.za

Hi all I have moved all the content over to blogspot. in the hopes of adding more features and getting the access speed up. All the articles are here including the most popular ones like Cisco DynDNS config and Cisco Static DHCP. ALL of them are waiting for you folks to go check out. I hope these How-Tos are going to help you. Please check on the "Blog Archive" on the left side of the screen for all the articles, or check the Right side for the Labels. In the Label box you will see the tags like Cisco Dynamic DNS Rancid Tacacs+ FreeBSD etc. I will be moving the www.joe-ma.co.za domain over to blogspot in the next 2 months or so.

Configuring FreeBSD Postfix Mailscanner and Mailwatch

Configuring Mailscanner Mailwatch and Postfix for FreeBSD The Install guide is here I have split the install guide and the configuration guide as they are pretty involved and might cause confusion if they where put together. I will start off with the easier stuff like clamav and then move on to spamassassin and postfix and then finally to mailscanner and mailwatch. if you have not already read the Install Guide Which might be helpful to newcomers here is a summery of what has been installed. Apache and php - this is for the Mailwatch web frontend. Mysql - This is where mailscanner will log info and where your black and white lists will live. Mailwatch - Mailwatch is the web front end to help monitor and manage Mailscanner. Spamassassin - This is the system that checks the mail content looking for spam. Clamav - the Antivirus scanner that Mailscaner will use Mailscanner - The server that uses all of the above to keep your mail clean and spam free. Ok now that that is over: Confi...

FreeBSD, Postfix, Mailscanner and Mailwatch Installation

Installing postfix, mailscanner and mailwatch on FreeBSD I have setup a number of servers using mailscanner and postfix to do antispam and antivirus checking. This particular example will show you how to set the server up as a mail gateway. i.e. all inbound and outbound mail will go via this server. You can also use the server as a pop3/imap4 server and doing so, does make life a little easier as you don't have to worry about the transport and relay_hosts files. At a later stage I will show that info too..... when I get a chance. This my seem strange but as there is quite a bit involved in installing and configuring I am splitting this into two How-To's this one, The install How-To and the configuration How-To First off its probably best to start on a new install of FreeBSD. Once you have done the initial portsnap fetch and portsnap extract Right here we go. Two things you might want to do is force your NIC to 100MB full duplex and install lsof Type in ifconfig and check if the...

Logging to syslog-ng on FreeBSD

Logging Cisco devises to syslog on FreeBSD Overview What we are going to do here is get a FreeBSD server up and running with syslog-ng, so that we can log information from our Cisco devises to it. This How-To will be pretty detailed and we will be logging data from Cisco Routers Switches and Cisco PIX Firewalls. We are going to get the syslog-ng daemon to create the log files automatically and to log to a new file each day, with a date stamp in the file name. Installation This is probable the easiest part All you have to do is “cd /usr/ports/sysutils/syslog-ng” and run “make install clean” Now that the port is installed you can edit the syslog-ng startup script to change the following line from NO to YES : ${syslog_ng_enable:="NO"} : ${syslog_ng_enable:="YES"} also add syslog_ng_enable="YES" to your /etc/rc.conf file Save the file, then edit your /etc/rc.conf file and add syslog_ng_enable="YES" and also add syslogd_enable="NO" this wil...

Securing PHP4

There are many things to take into account when it comes to trying to secure anything not only PHP or Apache or Postfix or anything else 1. You and your users still need to be able to use it 2. The server can be as secure as possible but a few lines of bad code can really screw up your morning. There are a few things to keep in mind when configuring the php.ini file Firstly its probably not a bad idea to chroot your apache server, there are a few very good examples on how to do this on the web Just do a search in google or something in your php.ini file add the following safe_mode = On safe_mode_gid = Off expose_php = Off register_globals = Off display_errors = Off log_errors = On error_log = "filename" safe_mode = On By switching on the safe_mode, you have just made your server probably twice as secure as it was before. Safe mode will ensure that only the owner of the file or script is able to read or execute that file or script Here is an example -rw-rw-r-- 1 joeuser j...

Multiple IP addresses on FreeBSD on the same NIC

Sometimes you need more than one address aliased to a network interface on a server. for instance if you want to use ssl pages in apache each ssl certificate should have its own IP address and each VirtualHost that runs on port 443 should have a unique IP address. You can get around thins by changing the port from 443 to something like VirtualHost:4430 vhost info VirtualHost:4431 vhost info VirtualHost:4432 But you are not using default ports and it might be a problem out in the real world sure you could do the above in side your own network Anyway thats not what this is about this is to Alias other IP's to your NIC on your FreeBSD server all you have to do is edit the /etc/rc.conf file defaultrouter="10.10.10.1" hostname="mysrv.mydom.com" ifconfig_em0="inet 10.10.10.4 media 100baseTX mediaopt full-duplex netmask 255.255.255.0" ifconfig_em0_alias0="10.10.10.7 netmask 0xffffffff" ifconfig_em0_alias1="10.10.10.8 netmask 0xffffffff" if...

Securing Apache 1.3

Securing Apache 1.3 Overview There are many things to keep in mind when trying to secure anything, one of the most important is to make user that the system is usable and secure there is usually a bit of a trade off between security and usability. You could secure Apache by not allowing users to use any sort of scripts or only plain HTML pages but that’s not usually practical. In this article I am going to go over the basic things to keep in mind on how to secure Apache but I will not go into running it in a jailed root mode. There is however a great article on this over at SecurityFocus . Installation Firstly you will need to install Apache if you are using FreeBSD then simply go to your ports directory and run a make install clean /usr/ports/www/apache13 Or any of the other apache 1.3 ports that you might want to install Like apache13-modssl or apache13-ssl/ In the case of the SSL apache versions you would install as follows # make # make certificate ( this is so you can create a s...