|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
PF will automatically adjust rules if you place the interface within parentheses, and the IP address changes.
Tools for managing dynamic IP addresses are already in the ports/packages system. For example, I use net/ddclient to keep my DNS records up-to-date at dyndns.org. |
|
||||
Yes I am using ddclient as of right now, as far as I can see it is using a web site to check its IP... this would work fine with one IP address, but it'll not work with multiple pppoe connections because there would be only one default gateway...
I notice that in the ddclient configuration that one can give it a nic name instead... I guess the question is that rather if it will work with BSD or if it assumes that it is on a Linux system and couldn't figure it out...
__________________
She sells C shells by the seashore. |
|
||||
Perhaps.
There are only two ways to check IP address assignments that I can think of: 1) Examining IP addresses in ifconfig output, as you have already suggested (there might be a sysctl too, but this is the same thing, really). 2) Connecting out and back, as ddclient does, because it is not operating system specific (as you have noted). One could, I suppose, also check timestamps on /var/db/dhclient.leases.IFNAME; changing modification timestamps would show lease renewals or new address assignments. The content may also be examined for additional information, such as lease expirations. Last edited by jggimi; 2nd October 2008 at 02:47 PM. |
|
||||
Well, I have just look at closer look at ddclient.
It seems to be pretty flexible, I haven't tried this yet, but from the documentation on sourceforge, you can supply an interface name into it, which ddclient will in turn call ifconfig itself. It also seems like they have some smart regex text process build in that will parse the output of any ifconfig, rather on Linux or BSD, and search for something that looks like an IP address; additionally, you can specify a pattern which the search will only be perform after it. A command can also be specified into ddclient, so you can write any script which can get the IP address from anywhere, and whatever it outputs ddclient will try to parse it and search for an IP... again it is the same as the specifying an interface name, one can supply a pattern which ddclient will skip in its search. Got to try this out soon.
__________________
She sells C shells by the seashore. |
|
|||
You can use getifaddrs(3) if you want to do this programmatically.
__________________
darkmark (!wired)?(coffee++):(wired); |
|
|||
Quote:
http://othermark.livejournal.com/3005.html
__________________
darkmark (!wired)?(coffee++):(wired); |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amazon's second hand sales section reliable? | Hashirsahebbb | Off-Topic | 3 | 28th March 2009 09:04 PM |
best package management method | TerryP | Off-Topic | 9 | 18th June 2008 03:57 PM |