Monday, February 11, 2008

FreeBSD beggining server set up

Everything you need is in the FreeBSD hand book but not everything in the hand book is something you need, so assuming you have a basic FreeBSD with ports installed. Let's go through the first things you need done after the install. First your going to want to make sure you have connectivity. Ping and see if you have that, if you do you may not need to set up anything for connectivity, but if you don't it is time to crack open the rc.conf.
You can use vi to edit the rc.conf and you need to be root.
vi /etc/rc.conf

add this line for dhcp
Replace fxp0 with the name of your network card which can be obtained through a standard ifconfig.
Let's say you want a static IP for your server:
ifconfig_fxp0="inet netmask"
Is similar to what you would put in your rc.conf replacing fxp0 again and the ip# and netmask# to match yours.

Next you need to make sure you have a route to the internet:
Add this to your rc.conf:
You can do this by a command:
# route add default

Next you need to make sure that you have name resolution
Make a file /etc/resolv.conf which contains:
nameserver ipofyournameserver
nameserver ipofbackupnameserver
Make sure those are both IP's and not DNS names

****WAIT WAIT***

A little shiznit on rc.conf, rc.conf will only load these settings on restart because rc.conf only exists to set up the settings when the computer is turned on, you can do all of these by command but they won't "stick"

Ok your first port install:
cd /usr/ports/security/nmap
And when that is done:
make install
Then you have nmap which is often overyplayed as a hacking tool but it is really a good troubleshooting tool as well, anyway happy hacking.

No comments: