Configure IP Addresses for Your New FreeBSD Server
Locating Your DNS Server File
How to Handle Package Management
TIPS:
How to Set "Non-active" Sessions to TerminateHow and Why to Fool DNS!
When and How to Lock Down Your Server
What is Wildcard DNS?
Don't Firewall Yourself Out!
Change Hostname
To change your hostname to example myhostname.mydomain.com- Run the command 'hostname myhostname.mydomain.com'
- Edit the file /etc/hosts
- Edit the file /etc/rc.conf
Configure IP Addresses
FreeBSD uses only 1 configuration file to list your IP addresses and default gateway:
/etc/rc.conf
There is one line per IP address in this file. Secondary (alias) IP addresses are configured with a netmask of 255.255.255.255. Here's an example of the lines you will need to have in /etc/rc.conf for 3 IP addresses:
ifconfig_fxp0="inet
10.10.10.10 netmask 255.255.255.0"
ifconfig_fxp0_alias0="10.10.10.11 netmask 255.255.255.255"
ifconfig_fxp0_alias1="10.10.10.12 netmask 255.255.255.255"
Restarting network to re-read IP address configuration
file:
/etc/netstart
DNS Server File
The file /etc/resolv.conf defines which name servers your dedicated server will use to resolve domain names. By default, ServePath's name servers are contained in this file by default but you can change these name servers to suit your needs.
Package Management
The FreeBSD Ports and Packages Collection offers a simple way for users and administrators to install applications.
TIPS
Fool DNS!
If you are testing the setup on a server that is not yet live, and you haven't pointed your DNS to your new server yet, here is a trick. You can fool your client machine into resolving the new IP by editing your local hosts file.
Here's how it works:
Your operating system will attempt to resolve domain names to IP addresses by first accessing a local file called the "hosts" file, which is simply a database of IP-to-hostname mappings. DNS is queried only if the domain name that you are looking for is not listed in this file. So, to trick your OS into resolving a "fake" IP address for your domain (pointing to your new server), just add one line to your local hosts file!
For Example:
12.13.14.15 hostname.YOUR-DOMAIN-HERE.com
Host File Locations:
/etc/hosts
Wildcard DNS
Get the most out of DNS with Wildcard DNS!
Do you want your users to get to your web site even if they mistype the URL? Use wildcard DNS to allow Internet users to resolve your IP address no matter what hostname they type.
How to do it:
Just use a "*" in the place of the host name
in your DNS configuration (works for BIND or Windows DNS)
*.YOUR-DOMAIN-HERE.com IN A 123.123.123.123
Don't Firewall Yourself Out!
ServePath always recommends using a software firewall to prevent unauthorized access to your server. But when installing a host-based software firewall, make sure that you do not block the remote administration ports and lock yourself out of your own server! Be sure to keep the following ports open:
port 22/TCP for SSH
