Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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"
share|improve this answer
And default gateway in /etc/rc.conf: defaultrouter="" – Alpacino Sep 12 '11 at 10:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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