I have

Comcast cable <====> modem <===> router <===> freebsd server

My freebsd server is connected to wireless router via a network cable.

What I want to do is, to have a static ip for the server.

How can I do it?


You can set static IP address in FreeBSD in /etc/rc.conf file. First you need to know what is name of your network interface that you want to configure. Use ifconfig to list all network interfaces, when you find it add following line to /etc/rc.conf:


for example:

ifconfig_dc0="inet netmask"
  • 3
    And default gateway in /etc/rc.conf: defaultrouter="" – Alpacino Sep 12 '11 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.