Howtos / Articles

Change the IPTables log file

An important aspect of any firewall are the log files. Iptables on Linux provides logging functionality, however by default, it will get outputted to the /var/log/messages log file. This can clutter things up, and make it hard to check the logs. If you want to change the file that IPTables logs to, you need to set up your iptables rules to output a log prefix. Rsyslog will then be configured to pick up this prefix, and output the information to…

Read more [...]

Backup your master boot record

The Linux DD command allows you to read and write directly to block devices. If you are playing around with boot loaders, dual booting, etc, its a good idea to take a copy of your master boot record just in case things go astray and you need to restore it. To backup the master boot record (MBR): $ sudo dd if=/dev/sda of=boot.bin bs=512 count=1 /dev/sda is the device of the hard drive you want to take the backup from. boot.bin…

Read more [...]

Run Postfix on multiple ports

The default port for SMTP is port 25, but there may be some scenarios where you may need Postfix to listen on another port as well (or instead of). For example, if you want to send emails via your own mail server, from your work computer, but the work network may be blocking all port 25 traffic out onto the internet from all PC’s but the mail server. You can get around this by setting up Postfix on another port…

Read more [...]

Limit Postfix to listen on specific IP addresses

On a default install of Postfix, it will listen on all interfaces/IP addresses on your machine. Sometimes this is not what you want. For example, the computer may be connected directly to the internet on one network interface, and connected to a lan on another interface, however you may not want to allow access to the SMTP server from the internet, and only use it for internal mail. You can do this by specifying only the internal address to listen…

Read more [...]

Disable icmp ping replies on Linux

Having a computer that replies to ping requests allows for simple network connectivity tests, however there may be circumstances where you need to disable ping replies coming from your computer. This can be done using firewall rules, however Linux provides an easy way to change the kernel parameters at run time to disable ping replies. Kernel parameters can be changed using the ‘sysctl’ command. Command to disable ping replies: $ sudo sysctl -w net.ipv4.icmp_echo_ignore_all=1 Command to enable ping replies: $…

Read more [...]



Page 6 of 9123456789