- Posts: 301
- Thank you received: 3
OpenBSD
18 years 3 months ago #15915
by Bublitz
The Bublitz
Systems Admin
Hospice of the Red River Valley
Alright I've decided to make a OpenBsd firewall. Since i'm a linux newb this should be fun (=.
So far I've fully installed OpenBSD and it self boots YAY!
The first problem im running into is configuring interfaces on statup.
I've used the ifconfig commands to setup interfaces but those are erased when system shutsdown.
The openbsd manual says in /ect/hostname.interface file exists for each interface that I have....It doesn't
So i've tried to manually add them using vi (wow hard to get used to vi) so in /ect I created the file Bublitz.vr0
Then added the line in the file
inet (ip) (mask) (broadcast) (description)
On start up this does nothing. I know the system can see my 3 nics cause I can see all three when ifconfig is entered.
Am I missing something?
So far I've fully installed OpenBSD and it self boots YAY!
The first problem im running into is configuring interfaces on statup.
I've used the ifconfig commands to setup interfaces but those are erased when system shutsdown.
The openbsd manual says in /ect/hostname.interface file exists for each interface that I have....It doesn't
So i've tried to manually add them using vi (wow hard to get used to vi) so in /ect I created the file Bublitz.vr0
Then added the line in the file
inet (ip) (mask) (broadcast) (description)
On start up this does nothing. I know the system can see my 3 nics cause I can see all three when ifconfig is entered.
Am I missing something?
The Bublitz
Systems Admin
Hospice of the Red River Valley
18 years 3 months ago #15917
by nske
Replied by nske on topic Re: OpenBSD
Yes, "hostname" is not meant to be replaced by your actual hostname. Try creating the file "/etc/hostname.vr0"
18 years 3 months ago #15918
by Bublitz
The Bublitz
Systems Admin
Hospice of the Red River Valley
Replied by Bublitz on topic Re: OpenBSD
Thanks. Yup that was the ticket. Can you put a gateway on a interface, or do you use default routes for that kind of stuff?
The Bublitz
Systems Admin
Hospice of the Red River Valley
18 years 3 months ago #15919
by nske
Replied by nske on topic Re: OpenBSD
Yes, you can execute any command through the hostname.interface scripts.
I.e., to add a route for the 192.168.0/24 network, you can add in your hostname.vr0:
[code:1]! /sbin/route -n add 192.168.0.0/24 192.168.0.5[/code:1]
The route will use the interface that has an address to the specific network automatically.
I.e., to add a route for the 192.168.0/24 network, you can add in your hostname.vr0:
[code:1]! /sbin/route -n add 192.168.0.0/24 192.168.0.5[/code:1]
The route will use the interface that has an address to the specific network automatically.
18 years 3 months ago #15984
by Bublitz
The Bublitz
Systems Admin
Hospice of the Red River Valley
Replied by Bublitz on topic Re: OpenBSD
Whats the ! for ?
The Bublitz
Systems Admin
Hospice of the Red River Valley
18 years 3 months ago #15985
by d_jabsd
! means (paraphrased) 'execute the following full command outside of the rc init script'
if you only have a default route, you can put it's address in /etc/mygate instead, which is processed by the rc init script.
Replied by d_jabsd on topic Re: OpenBSD
Whats the ! for ?
! means (paraphrased) 'execute the following full command outside of the rc init script'
if you only have a default route, you can put it's address in /etc/mygate instead, which is processed by the rc init script.
Time to create page: 0.131 seconds