Temat: dhcp, wymuszenie uzywania bramy, pusty plik /tmp/dhcp.leases
1) klienci ktorza lacza sie po dhcp nie uzywaja bramy ktorej wymuszam (uzywaja tej ktora stoi przed moim routerem - mirotik/antena/provider)
2) pusty plik /tmp/dhcp.leases
natomiast tutaj tmp/hosts/odhcpd mam normalnie hosty,
Konfig dhcp: http://eterror.pl/public/dhcp
ogniomurek:
iptables -t nat -I PREROUTING -s 192.168.100.0/24 -p udp --dport 53 -j DNAT --to 192.168.100.2
iptables -t nat -I PREROUTING -s 192.168.100.0/24 -p tcp --dport 53 -j DNAT --to 192.168.100.2
Klient pobierajac swoje dane z dhcp otrzymuje zawsze brame 192.168.100.1 oraz dns'y ktorych nie wymienilem - reszta ustawien jest jak najbardziej poprawna.
192.168.100.1 - to antena od operatora internetu.
To otrzymuje:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : <operator>.net.pl
Description . . . . . . . . . . . : Qualcomm Atheros QCA9377 Wireless Network Adapter
Physical Address. . . . . . . . . : 94-E9-79-73-B9-57
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:470:64c4:0:9d41:e8ce:4a94:846c(Preferred)
IPv6 Address. . . . . . . . . . . : fd5c:4968:f969::86b(Preferred)
Lease Obtained. . . . . . . . . . : środa, 1 listopada 2017 11:35:45
Lease Expires . . . . . . . . . . : niedziela, 9 grudnia 2153 18:52:13
IPv6 Address. . . . . . . . . . . : fd5c:4968:f969:0:9d41:e8ce:4a94:846c(Preferred)
IPv6 Address. . . . . . . . . . . : fdf9:dbb2:5c93:0:9d41:e8ce:4a94:846c(Preferred)
Temporary IPv6 Address. . . . . . : 2001:470:64c4:0:44b6:bc30:3566:dbb5(Deprecated)
Temporary IPv6 Address. . . . . . : 2001:470:64c4:0:9057:7ed8:9cef:8f96(Preferred)
Temporary IPv6 Address. . . . . . : fd5c:4968:f969:0:44b6:bc30:3566:dbb5(Deprecated)
Temporary IPv6 Address. . . . . . : fd5c:4968:f969:0:9057:7ed8:9cef:8f96(Preferred)
Temporary IPv6 Address. . . . . . : fdf9:dbb2:5c93:0:9057:7ed8:9cef:8f96(Preferred)
Link-local IPv6 Address . . . . . : fe80::9d41:e8ce:4a94:846c%9(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.100.116(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : czwartek, 2 listopada 2017 11:19:47
Lease Expires . . . . . . . . . . : czwartek, 2 listopada 2017 13:19:45
Default Gateway . . . . . . . . . : fe80::ea94:f6ff:feed:ba37%9
192.168.100.1
DHCP Server . . . . . . . . . . . : 192.168.100.1
DHCPv6 IAID . . . . . . . . . . . : 60090745
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-93-43-EF-54-AB-3A-E5-7E-C4
DNS Servers . . . . . . . . . . . : fd5c:4968:f969::1
178.219.112.17
178.219.112.1
NetBIOS over Tcpip. . . . . . . . : Enabled
... Oczywiście w przypadku, gdy maszyna z serwerem DHCP nie jest jednocześnie bramą sieciową. Natomiast jeśli chodzi o drugą opcję, to określa ona adresy serwerów DNS, które powinny zostać ustawione na hostach pobierających lease DHCP. Standardowo router uzupełnia to pole wpisując swój własny adres, po czym wszystkie zapytania DNS skierowane do niego są forward'owane zwykle do serwerów DNS naszego ISP. ....
Z tego co widze, to nic nie zrobie.