On 2017 May 29 (Mon) at 02:13:57 +0000 (+0000), Tinker wrote:
:Hi misc@,
:
:For pluggable devices such as USB NIC:s, is there any way to make OpenBSD
:bind a particular device based on its MAC or USB serial number or the like
:variable, to a particular interface or device filename?
:
:E.g. MAC X is prebooked as cdce0, and MAC Y as cdce1 , and external USB
:harddrive with serial number Z as /dev/sd0 and the one with serial number A
:as /dev/sd1 (and plugging in other devices would automatically).
:
:(For storage devices there's the DUID-based mounting already though, so I
:guess those are a non-issue.)
:
:Some things in the OS are specified per interface/device name, e.g. PF rules
:(e.g. "pass in proto tcp from any to cdce0 port 123 rdr-to cdce1 ..", "match
:out on cdce0 from 192.168.0.0/16 to any nat-to cdce0"), so having the
:interface numbers garbled on replug may be an unnecessary reason to reboot?
:
:Would be happy to learn any best practice here, thanks,
:Tinker
:
match out on egress from 192.168.0.0/16 to any nat-to (egress)
^^^^^^ ^^^^^^^^
the interface group "egress" is added to the interface a default route
uses. Wrapping that with (), will ensure that interface is updated when
the default routes uses a different interface.
--
It looks like blind screaming hedonism won out.
No comments:
Post a Comment