[BATCH] Change DNS Server

Discussion in 'Scripting' started by CODYQX4, Aug 31, 2011.

  1. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #1 CODYQX4, Aug 31, 2011
    Last edited: Apr 15, 2019
    .
     
  2. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    If you use a router, it would be far more productive to set the DNS information within its configuration and leave all PCs on your network alone.
     
  3. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #3 CODYQX4, Sep 1, 2011
    Last edited: Apr 15, 2019
    (OP)
    .
     
  4. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    Well to be fair only a minority of people here would be in that situation, which is why I mentioned it.

    Also in order for the script to be of real value, I would suggest that it only changes one network connections settings and is capable of programatically determining which one of those connections to change. (instead of asking each person to find out the name of the correct connection and inputting it by hand into the script before running it).
     
  5. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #5 CODYQX4, Sep 1, 2011
    Last edited: Apr 15, 2019
    (OP)
    .
     
  6. PalermoTech46

    PalermoTech46 MDL Junior Member

    Nov 18, 2011
    61
    3
    0
    Very good work here. Saving minutes worldwide! time the greatest asset.
     
  7. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    Sure, let Google take over your life completly, now they do not have to track your queries in search engine, they have you using their DNS - like telling the whole street all you darkest secrets & hoping it will be OK

    sebus
     
  8. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #8 CODYQX4, Nov 26, 2011
    Last edited: Apr 15, 2019
    (OP)
    .
     
  9. meiskam

    meiskam MDL Novice

    Jul 17, 2012
    1
    0
    0
    thanks CODYQX4, I hated how connectify forced me to use opendns and not the dns setting I had on the router.
     
  10. wr1334

    wr1334 MDL Novice

    Mar 23, 2013
    3
    0
    0
    When I run this batch file am getting as The filename, directory name or volume label syntax is incorrect. What to do?

    Thanks in Advance.
     
  11. _patrik_

    _patrik_ MDL Member

    May 25, 2007
    178
    45
    10
  12. wtarkan

    wtarkan MDL Member

    Sep 1, 2009
    194
    379
    10
    and now Dns Jumper v1.0.5 has IPv6 support , thanks
     
  13. Roscon

    Roscon MDL Novice

    Jul 15, 2017
    20
    15
    0
    Free and Public DNS Servers:
    Updated list of the best publicly available and completely free DNS servers
    lifewire. com/free-and-public-dns-servers-2626062

    Preferably in my case I prefer the "Provider "Yandex. DNS" and preferably "Yandex Family" which is perhaps one of the fastest and safest.
    DNS.Yandex
    ---------------------------------
    ** For Connection with IPv4:
    ---------------------------------

    Yandex's Basic:

    Primary DNS Server : 77.88.8.8
    Secondary DNS Server : 77.88.8.1

    Yandex's Safe:

    Primary DNS Server : 77.88.8.8
    Secondary DNS Server : 77.88.8.2

    Yandex's Family:

    Primary DNS Server : 77.88.8.8
    Secondary DNS Server : 77.88.8.3

    ---------------------------------
    ** For Connection with IPv6:
    ---------------------------------

    Yandex's Basic:

    Primary DNS Server : 2a02:6b8::feed:0ff
    Secondary DNS Server : 2a02:6b8:0:1::feed:0ff

    Yandex's Safe:

    Primary DNS Server : 2a02:6b8::feed:bad
    Secondary DNS Server : 2a02:6b8:0:1::feed:bad

    Yandex's Family:

    Primary DNS Server : 2a02:6b8::feed:a11
    Secondary DNS Server : 2a02:6b8:0:1::feed:a11
     
  14. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,171
    1,052
    60
    To change DNS for any DHCP connection (no need to know the name):
    Code:
    wmic nicconfig where DHCPEnabled=TRUE call SetDNSServerSearchOrder ("208.67.222.222","208.67.220.220")
    To change DNS based on MAC address:
    Code:
    wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call SetDNSServerSearchOrder ("84.200.70.40","84.200.69.80")