~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KLIENT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Linux %sieć jako NAT ip a ping 8.8.8.8 %zmiana ustawień virtual boxa na siec wewnetrzną ip link set enp0s3 down ip link set enp0s3 up ip a %2: enp0s3: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:ac:cc:8a brd ff:ff:ff:ff:ff:ff inet 10.0.0.3/24 brd 10.0.0.255 scope global dynamic noprefixroute enp0s3 valid_lft 43013sec preferred_lft 43013sec inet6 fe80::57b3:7b8b:af17:91cc/64 scope link noprefixroute valid_lft forever preferred_lft forever ping server ping 10.0.0.1 ping 8.8.8.8 - nie dziala gdyz nie ma routiungu na serwerze ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SERVER ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~https://graspingtech.com/dnsmasq-ubuntu-18-04/ DNS/DHCP edit the hostname in the /etc/hosts 127.0.1.1 server To 10.0.0.1 server ip link set enp0s3 up ip link set enp0s8 down sudo apt-get install dnsmasq %modify the /etc/resolv.conf nano /etc/resolv.conf %nameserver 127.0.0.1 lub echo "nameserver 127.0.0.1" | sudo tee /etc/resolv.conf sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bak # nano /etc/dnsmasq.conf %paste # Global settings domain-needed bogus-priv no-resolv expand-hosts filterwin2k # Upstream nameservers server=10.0.0.1 server=8.8.8.8 # domain name domain=x.local local=/x.local/ listen-address=127.0.0.1 listen-address=10.0.0.1 %CRTL+X zapisać i systemctl stop systemd-resolved systemctl disable systemd-resolved systemctl restart dnsmasq %Configure DHCP- add the following to the config file and restart the service # DHCP options dhcp-range=10.0.0.2,10.0.0.253,12h dhcp-lease-max=10 dhcp-option=option:router,10.0.0.1 dhcp-option=option:dns-server,10.0.0.1 dhcp-option=option:netmask,255.255.255.0 %CRTL+X zapisać i systemctl restart dnsmasq %How to assign fixed addresses dhcp-host=08:00:27:AC:CC:8A,10.0.0.3,klient %How to view DHCP Leases $ cat /var/lib/misc/dnsmasq.leases 1639014163 08:00:27:ac:cc:8a 10.0.0.3 klient 01:08:00:27:ac:cc:8a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~