-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
I want to create whitelisting in our firewall for specific RDNS entries because I don't know the PrimaryIPv4 address of the machine that will be created.
Is it possible to add a flag for providing a domain that is used for the RDNS pointer?
I am a go newbie. Would something like this work?
func (d *Driver) setupRDNS() error {
if d.RDNSDomain == "" {
return nil
}
log.Infof("configuring RDNS ...")
opts := hcloud.PrimaryIPChangeDNSPtrOpts{
DNSPtr: d.MachineName + "." + d.RDNSDomain,
}
act, _, err := d.getClient().PrimaryIP.ChangeDNSPtr(context.Background(), opts)
if err != nil {
return fmt.Errorf("could not change DNS pointer: %w", err)
}
return d.waitForAction(act)
}Metadata
Metadata
Assignees
Labels
No labels