Usando o Prompt de Comando (dnscmd)Abra o Prompt de Comando como Administrador e utilize a seguinte estrutura para adicionar um registro do tipo A (endereço IP):
dnscmd . /RecordAdd <NomeDaZona> <NomeDoHost> A <EnderecoIP>
Exemplo prático:
dnscmd . /RecordAdd meu-dominio.com meu-servidor A 192.168.1.50
O ponto . indica que você está gerenciando o servidor DNS local.
Usando o PowerShell (Add-DnsServerResourceRecordA)
Abra o Windows PowerShell como Administrador e execute o comando correspondente para a zona de pesquisa direta:
Add-DnsServerResourceRecordA -Name <NomeDoHost> -IPv4Address <EnderecoIP> -ZoneName <NomeDaZona>
Exemplo prático: Add-DnsServerResourceRecordA -Name meu-servidor -IPv4Address 192.168.1.50 -ZoneName meu-dominio.com
Adicionar registro DNS windows linha de comando
Export/import windows server DNS zones
Export-DnsServerZone and Import-DnsServerZone. - Export:
Export-DnsServerZone -Name "test.com" -Filename "test.com.dns" - Import:
Import-DnsServerZone -Name "test.com" -Filename "test.com.dns"
The file "test.com.dns" will be created in "C:\windows\system32\dns" folder
Only export dns records:
Get-DnsServerResourceRecord -ZoneName "test.com" | Export-Csv -Path "C:\temp\dns.csv"
Import option 2:
dnscmd localhost /zoneadd teste.com /primary /file teste.com /load
Openshift custom /etc/hosts config
To add custom entries in the /etc/hosts file of pods, you can utilize the hostAliases field in the deployment configuration. This field allows you to define a list of custom hostname and IP address mappings.
Here’s an example of how you can add a custom entry using the oc command-line tool:
$ oc get deployment httpd1 -o yaml | grep -A4 -B14 hostAliases
spec:
containers:
- image: image-registry.openshift-image-registry.svc:5000/iamgini-dev/httpd1@sha256:b58b0719265d8b1a5beacfb42f4f2e946905c1ba4069c9949834edf97db3ace2
imagePullPolicy: Always
name: httpd1
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
hostAliases:
- hostnames:
- myadded.example.com
ip: 192.168.1.1
restartPolicy: Always
https://www.techbeatly.com/adding-custom-entries-in-etc-hosts-file-in-kubernetes-and-openshift-containers/
How to Configure WPAD through DNS
- First you have to configure a wpad site in your IIS
- Open the proxypac.pac file you have previously created and save as wpad.dat.
- Copy wpad.dat to the location: C:\inetpub\wwwroot
- Open IIS Management Console
- Add web site – right click on Sites
- Site name: wpad; Physical Path: C:\inetpub\wwwroot; Hostname: wpad / Set the binding with the Server IP address and click OK.
- In the newly created site add mime type: .dat; “MIME type: application/x-ns-proxy-autoconfig”
- DNS setup in order to have automatic proxy
- On your Domain Controller go to DNS.
- On your existing domain add New Zone, Primary Zone, Zone name: wpad.
- In this zone right click and select New Host. Name: wpad, IP address: the IP of your IIS server hosting the wpad.dat file.
- On the client machine: Set as primary DNS the IP of the Domain controller.
On Microsoft Windows Server 2008 or 2008R2 the WPAD domain can be blocked. To check if it is blocked run CMD with the command: dnscmd /info /globalqueryblocklist. If wpad appears in the response, you should run the command: dnscmd /config /enableglobalqueryblocklist 0. This should remove the blocking.
- Browser deployment from Group Policy:
- On the Domain Controller create a new Organization Unit with all the users you want to use the proxypac.pac file.
- Right click on the new OU and select “Create a GPO in this domain, and Link it here...”. Name it properly. Edit the new policy.
- In the same policy that enforces the Logon Script expand User Configuration/ Policies/ Windows Settings/ Internet Explorer Maintenance/ Connection / Automatic Browser Configuration.
- Enable “Automatically detect configuration settings”.
- On the Client side: Open CMD and run the command “gpupdate /force”.
- Delete the browsing history.
- Check that in IE - Automatically detect settings is enabled.
- Close and Reopen IE and verify if the wpad.dat has been updated and is the one from your IIS server. You can do this by opening Internet Options /General /Browsing History section – Settings/ View Files. In the opened folder check to see if you have wpad.dat file and that the content is correct.
For Firefox you can manually set the settings from the client machine:
- Open Firefox.
- Select Tools from the application menu, click Options.
- Click the Advanced section, click Settings under Connection.
- Select Auto-detect proxy settings for this network, click OK.
Unblock DNS query:
To check if wpad DNS is blocked run:
dnscmd /info /globalqueryblocklist
If wpad is listed, so it's blocked.
To unblock wpad DNS:
dnscmd /config /enableglobalqueryblocklist 0
Corrigir erro NATS no Segura
### erro Nats orbit nats stop orbit nats setup orbit services reload orbit services restart all ls -lh /var/orbini/system/incdt/
Mais vistos
-
Find Users Who Have Never Logged On Use the following PowerShell Command; Get-ADUser -Filter { LastLogonDate -notlike "*" -and En...
-
Java Keytool Command These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. A...
-
First you have to configure a wpad site in your IIS Open the proxypac.pac file you have previously created and save as wpad.dat. Copy wpa...