1

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.

1 Answer 1

8

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)

4
  • 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, 2010 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, 2010 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, 2010 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, 2013 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .