I have an openBSD firewall, and I would really like to know in which file the IP adress of the firewall is stored.

And also where can I see if it set up to be with static IP or dhcp?

Edit by pauska: Dont pack your /etc and put it on public hosting, it contains encrypted passwords and other info that could easily make you a target for hackers.


for each interface: /etc/hostname.<if> e.g. if the interface is em0, the file is /etc/hostname.em0

If the IP address is obtained via DHCP, there is only dhcp in it, else the address, network mask and options

Maunal page for this.

Update: if you want to set you IP address, just create the files. The /etc you provided doesn't contain any configuration of a "real" machine (no network, no ip adresses etc.) It lookslike a generic installer template (flashrd is mentioned, although I haven't used it yet)

| improve this answer | |
  • It is very strange. I don't have any files that starts with hostname. I have updated the question with a link to the content of /etc. – Sandra Oct 10 '10 at 0:56
  • Thanks for the update. That really helped me out. I would have expected that flashrd configured the interfaces. I am pretty sure I did set them at install time...? – Sandra Oct 11 '10 at 23:12
  • I'm only familiar with the standard installer and some crude manually-putting-it-on-a-cf-card back then when cf cards were 64mb. – knitti Oct 11 '10 at 23:15
  • 1
    If the installer did not recognise a network card, it will happily install OpenBSD without reference to a network card (i.e. there is no /etc/hostname.*) Where this is the case, you can use `dmesg' after you've installed a network card (or boot the OS on a new machine with a network card.) Using the information of the 'network card' from dmesg, you can then create your own /etc/hostname.* file. For example: dmesg may tell you it identified a network card bge0. You can now configure /etc/hostname.bge0 to store configuration for that NIC. – samt Oct 16 '13 at 10:10

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.