DNSMasq giving out dynamic leases instead of static leases:
I have been using the same firmware for the past year (23.05) and now when I try to connect to my lan network dnsmasq will not assign an ipv4 address. My computer will assign its own address and I wont be able to use the interface. An ipv6 address is assigned. I want to know how to fix this issue.
Error:
The IP address should be in the 192.168.1.1/24 range. My computer will assign its own address.
DHCP:
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config dhcp 'TheLoft_Guest'
option interface 'TheLoft_Guest'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'TheLoft_IOT'
option interface 'TheLoft_IOT'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'TheLoft_VPN'
option interface 'TheLoft_VPN'
option start '100'
option limit '150'
option leasetime '12h'
list dhcp_option '6,ip_address,ip_address'
config dhcp 'wg0'
option interface 'wg0'
option ignore '1'
config host
option name 'openipc-t31'
option ip '172.16.0.108'
option mac 'MAC'
config host
option name 'alienware-ubuntu'
option ip '172.16.0.136'
option mac 'MAC'
Firewall:
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
list network 'wg1'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config zone
option name 'guest'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'TheLoft_Guest'
list network 'wg2'
config zone
option name 'iot'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'TheLoft_IOT'
config zone
option name 'vpn'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'TheLoft_VPN'
config forwarding
option src 'lan'
option dest 'iot'
config forwarding
option src 'guest'
option dest 'wan'
config rule
option name 'TheLoft_Guest DHCP and DNS'
option src 'guest'
option dest_port '53 67 68'
option target 'ACCEPT'
config rule
option name 'TheLoft IOT DHCP and DNS'
option src 'iot'
option dest_port '53 67 68'
option target 'ACCEPT'
config rule
option name 'TheLoft_VPN DHCP'
option src 'vpn'
option dest_port '67 68'
option target 'ACCEPT'
config include 'pbr'
option fw4_compatible '1'
option type 'script'
option path '/usr/share/pbr/pbr.firewall.include'
config zone
option name 'wg0'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'wg0'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'vpn'
option dest 'wg0'
config rule
option name 'TheLoft_VPN WAN Block'
option src '*'
list src_ip '10.20.40.1/24'
option dest 'wan'
option target 'REJECT'
config forwarding
option src 'vpn'
option dest 'guest'
config forwarding
option src 'guest'
option dest 'vpn'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'nginx_http'
option src 'wan'
option src_dport '80'
option dest_ip '192.168.1.236'
option dest_port '40080'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'nginx_https'
option src 'wan'
option src_dport '443'
option dest_ip '192.168.1.236'
option dest_port '40443'
config redirect
option dest 'lan'
option target 'DNAT'
option name 'wg_loft'
option src 'wan'
option src_dport '61420'
option dest_ip '192.168.1.1'
option dest_port '61420'
Network:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd54:c585:2ebe::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.10'
list ports 'eth1.1'
option ipv6 '1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '6t 4 3 2 1'
option vid '1'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 5'
option vid '2'
config device
option type 'bridge'
option name 'br-guest'
list ports 'eth0.20'
config device
option type 'bridge'
option name 'br-iot'
list ports 'eth0.30'
config device
option type 'bridge'
option name 'br-vpn'
list ports 'eth0.40'
config interface 'TheLoft_Guest'
option proto 'static'
option device 'br-guest'
option ipaddr '10.20.30.1'
option netmask '255.255.255.0'
config interface 'TheLoft_IOT'
option proto 'static'
option device 'br-iot'
option ipaddr '172.16.0.1'
option netmask '255.255.255.0'
config interface 'TheLoft_VPN'
option proto 'static'
option device 'br-vpn'
option ipaddr '10.20.40.1'
option netmask '255.255.255.0'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '10'
option ports '0t 6t 4t 3t 2t 1t'
config switch_vlan
option device 'switch0'
option vlan '4'
option vid '20'
option ports '0t 6t 4t 3t 2t 1t'
config switch_vlan
option device 'switch0'
option vlan '5'
option vid '30'
option ports '0t 6t 4t 3t 2t 1t'
config switch_vlan
option device 'switch0'
option vlan '6'
option ports '0t 6t 4t 3t 2t 1t'
option vid '40'
config interface 'wg0'
option proto 'wireguard'
option private_key 'KEY'
list addresses '10.5.0.2'
list dns 'DNS'
list dns 'DNS'
config wireguard_wg0
option description 'Description'
option public_key 'KEY'
option endpoint_host 'IP_ADDRESS'
option endpoint_port 'port'
option persistent_keepalive '30'
list allowed_ips '0.0.0.0/0'
config interface 'wg1'
option proto 'wireguard'
option private_key 'KEY'
list addresses '10.20.50.1/24'
option listen_port 'PORT'
config wireguard_wg1
option description 'MACBOOK
option public_key 'KEY'
option private_key 'KEY'
list allowed_ips '10.20.50.2/32'
option endpoint_host 'HOST'
option endpoint_port 'PORT'
option persistent_keepalive '30'
config interface 'wg2'
option proto 'wireguard'
option private_key 'KEY'
option listen_port 'port'
list addresses '10.20.60.1/24'
config wireguard_wg2
option description 'macboo'
option public_key 'KEY'
option private_key 'KEY'
list allowed_ips '10.20.60.2/32'
option endpoint_host 'ADDRESS'
option endpoint_port 'PORT'
option persistent_keepalive '30'
Wireless:
config wifi-device 'radio0'
option type 'mac80211'
option path 'soc/1b500000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option channel '36'
option band '5g'
option htmode 'VHT80'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'TheLoft'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
config wifi-device 'radio1'
option type 'mac80211'
option path 'soc/1b700000.pci/pci0001:00/0001:00:00.0/0001:01:00.0'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'TheLoft'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
config wifi-iface 'wifinet2'
option device 'radio0'
option mode 'ap'
option ssid 'TheLoft_Guest'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_Guest'
config wifi-iface 'wifinet3'
option device 'radio1'
option mode 'ap'
option ssid 'TheLoft_Guest'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_Guest'
config wifi-iface 'wifinet4'
option device 'radio0'
option mode 'ap'
option ssid 'TheLoft_IOT'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_IOT'
config wifi-iface 'wifinet5'
option device 'radio1'
option mode 'ap'
option ssid 'TheLoft_IOT'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_IOT'
config wifi-iface 'wifinet6'
option device 'radio0'
option mode 'ap'
option ssid 'TheLoft_VPN'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_VPN'
config wifi-iface 'wifinet7'
option device 'radio1'
option mode 'ap'
option ssid 'TheLoft_VPN'
option encryption 'psk2'
option key 'KEY'
option ieee80211r '1'
option mobility_domain 'domain'
option ft_over_ds '0'
option ft_psk_generate_local '1'
option network 'TheLoft_VPN'