• Changing Your DNS Server
  • L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h




    Download 7,3 Mb.
    Pdf ko'rish
    bet55/125
    Sana14.05.2024
    Hajmi7,3 Mb.
    #232858
    1   ...   51   52   53   54   55   56   57   58   ...   125
    Bog'liq
    linuxbasicsforhackers

    dig hackers-arise.com mx
    --
    snip
    --
    ;; QUESTION SECTION:
    ;hackers-arise.com. IN MX
    ;; AUTHORITY SECTION:
    hackers-arise.com. 5 IN SOA ns6.wixdns.net. support.wix.com 2016052216 
    10800 3600 604 800 3600
    --
    snip
    --
    Listing 3-4: Using 
    dig
     and its 
    mx
     option to get information on a domain mail exchange 
    server
    The most common Linux DNS server is the Berkeley Internet Name 
    Domain (BIND). In some cases, Linux users will refer to DNS as BIND, but 
    don’t be confused: DNS and BIND both map individual domain names to 
    IP addresses.
    Changing Your DNS Server
    In some cases, you may want to use another DNS server. To do so, you’ll edit 
    a plaintext file named /etc/resolv.conf on the system. Open that file in a text 
    editor—I’m using Leafpad. Then, on your command line, enter the precise 
    name of your editor followed by the location of the file and the filename. 
    For example,
    kali >
    leafpad /etc/resolv.conf


    Analyzing and Managing Networks
    35
    will open the resolv.conf file in the /etc directory in my specified graphical 
    text editor, Leafpad. The file should look something like Figure 3-1.
    Figure 3-1: A typical 
    resolv.conf
     file in a text editor
    As you can see on line 3, my nameserver is set to a local DNS server at 
    192.168.181.2. That works fine, but if I want to replace that DNS server with
    say, Google’s public DNS server at 8.8.8.8, I could place the following line in 
    the /etc/resolv.conf file to specify the nameserver:
    nameserver 8.8.8.8
    Then I would just need to save the file. However, you can also achieve the 
    same result exclusively from the command line by entering the following:
    kali >

    Download 7,3 Mb.
    1   ...   51   52   53   54   55   56   57   58   ...   125




    Download 7,3 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h

    Download 7,3 Mb.
    Pdf ko'rish