dns

Adding hosts to /etc/hosts on Leopard/Snow Leopard

Technical:

Adding hosts to /etc/hosts on Leopard/Snow Leopard is a little simpler than earlier versions (see /etc/hosts on Mac OS X)

  • Edit /private/etc/hosts1
  • Run dscacheutil -flushcache

  1. Since /etc is symlinked from /private/etc /private/etc/hosts is the same file as /etc/hosts 

Converting existing bind9 and dhcpd to dynamic dns

I have a working dns (bind9) and dhcpd running on my home lan. This adds dynamic dns updates from dhcpd to bind9.

The following is mostly based on http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/. Kudos til Trygve Laugstøl for assistance too :)


Key

First - generate a key to use:

Building a debian firewall on a CF card

I currently have an OpenBSD firewall running on an ancient 586. I have a mini-itx board, CF/IDE converter and a CF card and have been intending to upgrade.

However - rather than OpenBSD I'm going to try for debian (since I know that much better).

This post will end up being a "how I did it" - but at the minute is just a collection of the notes I'm grabbing for now.

For the initial install - I hung a CD-ROM as the slave IDE unit on the primary IDE channel.

I used the 4.0r3 etch netinst CD downloaded from debian.org.

/etc/hosts on Mac OS X

Technical:

For details on how to use /etc/hosts on Mac OS X - see http://kb.doit.wisc.edu/middleware/page.php?id=4506

For later versions of OSX - this is superceded by Adding hosts to /etc/hosts on Leopard/Snow Leopard

exim4 - dnslookup - ignore_target_hosts

Technical:

The dnslookup section of the exim4 config contains

# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

To allow one specific subnet thru change it:
# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = !192.168.3.0/24 : 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

Here it allows the 192.168.3.x network.

Ad Blocking Hosts File

Want to get rid of lots of annoying adverts? Modify your hosts file - here's the link:

Mike's Ad Blocking Hosts File

Subscribe to RSS - dns