Posted by: jasonk2600 | November 26, 2009

Caching DNS Server Under FreeBSD

Operating your own caching DNS server can improve overall network responsiveness and decreases traffic and load on other DNS servers that are upstream.  The BIND DNS name server (named) is included in the FreeBSD base system and is simple to configure as a caching name server.

Begin by enabling the BIND DNS server to start at system boot:

echo "named_enable=YES" >> /etc/rc.conf

Next, edit the BIND DNS server configuration file located at /etc/namedb/named.conf. In the example below 10.0.2.1 is the IP address of the host running the BIND DNS server, 68.87.69.150 is the IP address of the ISP’s DNS server.  The forwarders setting will cause the BIND DNS server to contact the ISP’s DNS server to resolve any IP addresses that it does not already have in its cache.

listen-on { 10.0.2.1; };
forwarders { 68.87.69.150; };

Finally, be sure to configure your system to start using your newly configured caching DNS server by editing /etc/resolv.conf to use its own IP address for DNS queries.

nameserver 10.0.2.1

Be sure to configure any other hosts or DHCP servers to begin using the IP address of the caching DNS server.  Run the following command to start the caching DNS server, or simply reboot the system.

# /etc/rc.d/named onestart

Reference(s):

 

  [EoF]
Posted by: jasonk2600 | November 26, 2009

Command Aliases

You can use aliases to decrease the amount of typing you need to do to get commands you commonly use. Examples of fairly popular aliases include (in Bourne shell style, as in /bin/sh, bash, ksh, and zsh):

alias lf="ls -FA"
alias ll="ls -lA"
alias su="su -m"

In csh or tcsh, these would be:

alias lf ls -FA
alias ll ls -lA
alias su su -m

To remove an alias, you can usually use unalias aliasname. To list all aliases, you can usually type just alias.

 

  [EoF]
Posted by: jasonk2600 | November 26, 2009

FreeBSD Tip – Installed Ports

To determine whether or not a certain port has been installed or not use the following command:

pkg_info -Ix port_name

For example, to check if the openssl port has been installed run the following:

# pkg_info -Ix openssl
openssl-0.9.81     SSL and crypto library

To see a complete list of all installed ports run the pkg_info command without any options.

# pkg_info
joe-3.7,1           Joe's Own Editor
libiconv-1.13.1     A character set conversion library
libtool-2.2.6a_1    Generic shared library support script
m4-1.4.13,1         GNU m4
makedepend-1.0.1,1  A dependency generator for makefiles
openssl-0.9.8l      SSL and crypto library
   ...

 

  [EoF]
Posted by: jasonk2600 | November 25, 2009

Federal P2P Ban Proposed

Looks like the Federal Government may finally be wising up to he enormous security threats posed by the use of P2P file sharing software with a newly proposed bill that would prohibit P2P use on all Federal computer networks.  While P2P networks themselves do not necessarily pose a threat, the lack of data integrity, viruses, trojans, and worms that are widespread on such networks are detrimental.  Not to mention illegal software that is often cracked, which may cause such software to operate in unexpected ways.  Personally, I feel that P2P file sharing has no place on government computer networks from both a security perspective and a moral perspective.  Check out the full news article on the Government Information Security Website by clicking on the link below:

 

 

  [EoF]
Posted by: jasonk2600 | November 25, 2009

Random Notes – Creating Symlinks with LN

A symlink is simply a pointer to a file or directory.  Symlinks are used in Linux, *BSD, and UNIX operating systems.  When interacting or editing, the symlink acts as if it is the actual file or directory it points to.  Creating symlinks are fast and easy.

In the example below a symlink for the /usr/local/www/data directory is created under the /var/www/ directory.

# cd /var/www
# ln -s /usr/local/www/data

When changing to the /var/www/data/ directory you will actual be working with files that are located in /usr/local/www/data/.  This is very useful should the need to have access to the same files from different directories.

Creating symlinks for files is carried out in the same manner as directories.  In the example below a symlink for the /root/kernels/GENERIC.conf is created in the /usr/src/sys/i386/conf/ directory.

# cd /usr/src/sys/i386/conf
# ln -s /root/kernels/GENERIC.conf

NOTE: To remove or delete a symlink treat it as a normal file or directory. Only the symlink will be deleted, not the original files/directory. The example below deletes the two symlinks that we created above.

# rm /usr/src/sys/i386/conf/GENERIC.conf
# rm /var/www/data

 

  [EoF]

Older Posts »

Categories