Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just fyi, 192.168.122.X is the subnet for the built-in VM system (aka kvm), so comes as std.
eg if you run ifconfig, you'll probably see something like
Code:
virbr0 Link encap:Ethernet HWaddr 52:54:00:AF:7E:4A
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
Just fyi, 192.168.122.X is the subnet for the built-in VM system (aka kvm), so comes as std.
eg if you run ifconfig, you'll probably see something like
Code:
virbr0 Link encap:Ethernet HWaddr 52:54:00:AF:7E:4A
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
You could just ignore it.
Exactly. With other words: it is automatically configured for you according to your [virtual] network setup. If you wish to modify it most probably you need to [re]configure your bridge virbr0.
Cause I've installed the Bind DNS server on IP 192.168.1.7. As I am learning the DNS server and the KVM guest in question is used for testing the Bind server as an outsider. So every time I 'dig' something, it is resolved by 192.168.122.1 IP, which I don't want to use. I want it to use IP 192.168.1.7 instead of where my DNS server is.
Code:
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:0c:a8:83 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.78/24 brd 192.168.122.255 scope global noprefixroute dynamic enp1s0
valid_lft 3372sec preferred_lft 3372sec
inet6 fe80::cf9f:806f:2faa:e858/64 scope link noprefixroute
valid_lft forever preferred_lft forever
# nmap -p 53 192.168.1.7
Starting Nmap 6.40 ( http://nmap.org ) at 2020-05-07 19:52 IST
Nmap scan report for svr.cntnix.lan (192.168.1.7)
Host is up (0.00018s latency).
PORT STATE SERVICE
53/tcp open domain
# dig google.com
; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.2 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57136
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 177 IN A 172.217.163.78
;; Query time: 55 msec
;; SERVER: 192.168.122.1#53(192.168.122.1)
;; WHEN: Thu May 07 19:59:09 IST 2020
;; MSG SIZE rcvd: 55
# cat /etc/resolv.conf
# Generated by NetworkManager
search kvmlab.lan cntnix.lan
nameserver 192.168.122.1
nameserver 192.168.1.7
At least I want 192.168.1.7 to be my primary DNS server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.