set system hostname: Prezime-00
edit a connection: connection 1: WAN
edit a connection: connection 2: LAN: IPv4 CONFIGURATION MANUAL: ADRESSES ADD 172.17.143.1/24
yum install dhcp
file>otvori jos jedan terminal
nano /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
A slightly different configuration for an internal subnet>COPY
nano /etc/dhcp/dhcpd.conf>PASTE
subnet 172.17.143.0;
range 172.17.143.2 172.17.143.254;
option routers 172.17.143.1;
option broadcast adress 172.17.143.255;
option domain-name-servers 172.17.143.1;
systemctl start dhcpd
show ip
ip dhcp
ping 172.17.143.1
ping 1.1.1.1
sysctl -w net.ipv4.ip_forward=1
sysctl net.ipv4.ip_forward=1
COPY net.ipv4.ip_forward=1
nano /etc/sysctl.d/ipv4_forward.conf PASTE
firewall-cmd --direct --permanent --passthrough ipv4 -t nat -I POSTROUTING -o eth0 -j MASQUERADE
firewall-cmd --direct --permanent --passthrough ipv4 -t nat -I FORWARD -i eth1 -j ACCEPT
firewall-cmd --reload
ping 1.1.1.1
ping google.hr
yum install bind bind-utils
nano /etc/named.conf
listen on port 53: 172.17.143.1;
allow-query: 172.17.143.0/24;
forwarders {1.1.1.1; 1.0.0.1; 8.8.8.8; 8.8.4.4; }
firewall-cmd --add-port=53/udp
systemctl start named
systemctl enable named
firewall-cmd --reload