Re: dhclient.conf and hostname.if
On 07 May 2016, Stuart Henderson wrote: > On 2016-05-06, Mark Carroll wrote: (snip) >> pf ... because it otherwise doesn't realize that 'self' >> includes the address eventually assigned by PPP. > > Use "(self)" not "self". Interesting! Thank you: I'd previously missed this part of the pf.conf(5) manpage which explains: ] When the interface name is surrounded by parentheses, the rule is ] automatically updated whenever the interface changes its address. The ] ruleset does not need to be reloaded. This is especially useful with ] NAT. I'll have to give it a try. -- Mark
Re: dhclient.conf and hostname.if
On 2016-05-06, Mark Carroll wrote: > On 06 May 2016, Duncan Patton a. Campbell wrote: > >> Is there any similar tag to access the addess assigned by dhcp? >> What other mechanisms exist to update dynamic dns assignments? > > Could ifstated(8) help here? I've separately wondered if I ought to be > using it to kick pf because it otherwise doesn't realize that 'self' > includes the address eventually assigned by PPP. Use "(self)" not "self".
Re: dhclient.conf and hostname.if
On Fri, May 06, 2016 at 04:35:47AM -0600, Duncan Patton a Campbell wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > > Back when the script tag was removed from dhclient.conf the > functionality to do external commands was ostensibly moved > into hostname.if via the > > !command mechanism. > > in man hostname.if it says > > "It is worth noting that ``\$if'' in a command > line will be replaced by the interface name" > > Is there any similar tag to access the addess assigned by dhcp? > What other mechanisms exist to update dynamic dns assignments? You could write a script around "route monitor" (in a while loop) to get notified when you get a new address assigned to the interface. Another possibility is to use dhclient with option -L in combiantion with a tool like entr (in ports) to react on file changes. Remi
Re: dhclient.conf and hostname.if
On Fri, May 06, 2016 at 06:21:00AM -0600, Duncan Patton a Campbell wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On Fri, 06 May 2016 12:06:58 +0100 > Mark Carroll wrote: > > > On 06 May 2016, Duncan Patton a. Campbell wrote: > > > > > Is there any similar tag to access the addess assigned by dhcp? > > > What other mechanisms exist to update dynamic dns assignments? > > > > Could ifstated(8) help here? I've separately wondered if I ought to be > > using it to kick pf because it otherwise doesn't realize that 'self' > > includes the address eventually assigned by PPP. > > > > -- Mark > > > > Yes. Looking at the man page this might be a way to do what I want. > ...just need to sort out the macro language in man ifstated.conf ;^) ifstated looks at the physical link of an interface. In ifconfig output this is the line starting with status. This state does not change when a new address is assigned to an interface. Remi
Re: dhclient.conf and hostname.if
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Fri, 06 May 2016 12:06:58 +0100 Mark Carroll wrote: > On 06 May 2016, Duncan Patton a. Campbell wrote: > > > Is there any similar tag to access the addess assigned by dhcp? > > What other mechanisms exist to update dynamic dns assignments? > > Could ifstated(8) help here? I've separately wondered if I ought to be > using it to kick pf because it otherwise doesn't realize that 'self' > includes the address eventually assigned by PPP. > > -- Mark > Yes. Looking at the man page this might be a way to do what I want. ...just need to sort out the macro language in man ifstated.conf ;^) Thanks, Dhu - -- "Je suis Canadien. Ce n'est pas Francais ou Anglaise. C'est une esp`ece de sauvage" http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt Ne obliviscaris, vix ea nostra voco. iF4EAREIAAYFAlcsjCwACgkQiY6AzzR1lzzC3QEAhekbOo4bNOTMZ2Z0bSXgFkR/ o30ZMry21Ue0eDlnUmUA/jOMpk4pDBZHXh/NDWVl7TjJfr6TDGftTzsK3N1GyBKV =a1Z5 -END PGP SIGNATURE-
Re: dhclient.conf and hostname.if
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Fri, 6 May 2016 11:56:31 +0100 Raf Czlonka wrote: > On Fri, May 06, 2016 at 11:35:47AM BST, Duncan Patton a Campbell > wrote: > > > > Back when the script tag was removed from dhclient.conf the > > functionality to do external commands was ostensibly moved > > into hostname.if via the > > > > !command mechanism. > > > > in man hostname.if it says > > > > "It is worth noting that ``\$if'' in a command > > line will be replaced by the interface name" > > > > Is there any similar tag to access the addess assigned by dhcp? > > What other mechanisms exist to update dynamic dns assignments? > > Hi Duncan, > > Not sure if I understood you correctly but doesn't > > send host-name ... > - From my reading of man dhclient.conf this will send the local box's hostname to it's dhcp server and I'm looking to send the local box's just assigned dhcp_ip to a nameserver using nsupdate. Thanks Dhu > in dhclient.conf(5) do what you want? > > Regards, > > Raf > - -- "Je suis Canadien. Ce n'est pas Francais ou Anglaise. C'est une esp`ece de sauvage" http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt Ne obliviscaris, vix ea nostra voco. iF4EAREIAAYFAlcsiOUACgkQiY6AzzR1lzzN0AEA0a606QNYiWtTjBMh/keDxbUm STv6xWmwQ9KmzUIi21IA/309BUahCATDLfNBSOc4AF8frOpDy3ZMhr6qYHzKiLQo =HWd1 -END PGP SIGNATURE-
Re: dhclient.conf and hostname.if
On 06 May 2016, Duncan Patton a. Campbell wrote: > Is there any similar tag to access the addess assigned by dhcp? > What other mechanisms exist to update dynamic dns assignments? Could ifstated(8) help here? I've separately wondered if I ought to be using it to kick pf because it otherwise doesn't realize that 'self' includes the address eventually assigned by PPP. -- Mark
Re: dhclient.conf and hostname.if
On Fri, May 06, 2016 at 11:35:47AM BST, Duncan Patton a Campbell wrote: > > Back when the script tag was removed from dhclient.conf the > functionality to do external commands was ostensibly moved > into hostname.if via the > > !command mechanism. > > in man hostname.if it says > > "It is worth noting that ``\$if'' in a command > line will be replaced by the interface name" > > Is there any similar tag to access the addess assigned by dhcp? > What other mechanisms exist to update dynamic dns assignments? Hi Duncan, Not sure if I understood you correctly but doesn't send host-name ... in dhclient.conf(5) do what you want? Regards, Raf
dhclient.conf and hostname.if
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Back when the script tag was removed from dhclient.conf the functionality to do external commands was ostensibly moved into hostname.if via the !command mechanism. in man hostname.if it says "It is worth noting that ``\$if'' in a command line will be replaced by the interface name" Is there any similar tag to access the addess assigned by dhcp? What other mechanisms exist to update dynamic dns assignments? Thanks, Dhu - -- http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt Ne obliviscaris, vix ea nostra voco. iF4EAREIAAYFAlcsc4MACgkQiY6AzzR1lzykrQD/eTAfofD79x5CKeGVC33iZKOR TGNzYAYvkDTH6tYFfE0A/i7bQS3g6Thd3IAMLFkA5wudGAJwi3he0dQuPRhvKcP0 =6eqc -END PGP SIGNATURE-