Skip to content

Commit

Permalink
Update dhcp
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberAndi committed Sep 1, 2023
1 parent 5b23195 commit 2b964ff
Showing 1 changed file with 86 additions and 3 deletions.
89 changes: 86 additions & 3 deletions openWRT_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,8 @@ uci set dhcp.Blacklist.readethers='1'
uci set dhcp.Blacklist.nonwildcard='1'
uci set dhcp.Blacklist.localservice='1'
uci set dhcp.Blacklist.ednspacket_max='1232'
uci set dhcp.Blacklist.local='/stawimedia.local/'
uci set dhcp.Blacklist.domain='stawimedia.local'
uci set dhcp.Blacklist.local='/'$LOCAL_DOMAIN'/'
uci set dhcp.Blacklist.domain=$LOCAL_DOMAIN
uci set dhcp.Blacklist.leasefile='/tmp/dhcp.leases'
uci set dhcp.Blacklist.resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
uci set dhcp.Blacklist.serversfile='/etc/dnsmasq.d/Blacklist/'
Expand Down Expand Up @@ -2532,7 +2532,16 @@ uci set dhcp.HCONTROL.interface='HCONTROL'
uci set dhcp.HCONTROL.start='2'
uci set dhcp.HCONTROL.limit='250'
uci set dhcp.HCONTROL.leasetime='24h'
uci set dhcp.HCONTROL.domain=$HCONTROL_domain
uci set dhcp.HCONTROL.local='/'$HCONTROL_domain'/'
#uci add_list dhcp.HCONTROL.dhcp_option='6,'$HCONTROL_ip
uci add_list dhcp.HCONTROL.dhcp_option='6,'$INET_GW
uci add_list dhcp.HCONTROL.dhcp_option='3,'$HCONTROL_ip
uci add_list dhcp.HCONTROL.dhcp_option='42,'$INET_GW
uci add_list dhcp.HCONTROL.dhcp_option='15,'$HCONTROL_domain
uci set dhcp.HCONTROL.server=$HCONTROL_ip'#'$DNS_UNBOUND_port
uci set dhcp.HCONTROL.force='1'

uci set dhcp.CONTROL=dhcp
uci set dhcp.CONTROL.dhcpv4='server'
uci set dhcp.CONTROL.dhcpv6='server'
Expand All @@ -2544,7 +2553,16 @@ uci set dhcp.CONTROL.interface='CONTROL'
uci set dhcp.CONTROL.start='2'
uci set dhcp.CONTROL.limit='250'
uci set dhcp.CONTROL.leasetime='24h'
uci set dhcp.CONTROL.domain=$CONTROL_domain
uci set dhcp.CONTROL.local='/'$CONTROL_domain'/'
#uci add_list dhcp.CONTROL.dhcp_option='6,'$CONTROL_ip
uci add_list dhcp.CONTROL.dhcp_option='6,'$INET_GW
uci add_list dhcp.CONTROL.dhcp_option='3,'$CONTROL_ip
uci add_list dhcp.CONTROL.dhcp_option='42,'$INET_GW
uci add_list dhcp.CONTROL.dhcp_option='15,'$HONTROL_domain
uci set dhcp.CONTROL.server=$CONTROL_ip'#'$DNS_UNBOUND_port
uci set dhcp.CONTROL.force='1'

uci set dhcp.INET=dhcp
uci set dhcp.INET.dhcpv4='server'
uci set dhcp.INET.dhcpv6='server'
Expand All @@ -2556,7 +2574,16 @@ uci set dhcp.INET.interface='INET'
uci set dhcp.INET.start='2'
uci set dhcp.INET.limit='250'
uci set dhcp.INET.leasetime='24h'
uci set dhcp.INET.domain=$HCONTROL_domain
uci set dhcp.INET.local='/'$HCONTROL_domain'/'
#uci add_list dhcp.INET.dhcp_option='6,'$INET_ip
uci add_list dhcp.INET.dhcp_option='6,'$INET_GW
uci add_list dhcp.INET.dhcp_option='3,'$INET_ip
uci add_list dhcp.INET.dhcp_option='42,'$INET_GW
uci add_list dhcp.INET.dhcp_option='15,'$INET_domain
uci set dhcp.INET.server=$INET_ip'#'$DNS_UNBOUND_port
uci set dhcp.INET.force='1'

uci set dhcp.SERVER=dhcp
uci set dhcp.SERVER.dhcpv4='server'
uci set dhcp.SERVER.dhcpv6='server'
Expand All @@ -2568,7 +2595,16 @@ uci set dhcp.SERVER.interface='SERVER'
uci set dhcp.SERVER.start='2'
uci set dhcp.SERVER.limit='250'
uci set dhcp.SERVER.leasetime='24h'
uci set dhcp.SERVER.domain=$SERVER_domain
uci set dhcp.SERVER.local='/'$SERVER_domain'/'
#uci add_list dhcp.SERVER.dhcp_option='6,'$SERVER_ip
uci add_list dhcp.SERVER.dhcp_option='6,'$INET_GW
uci add_list dhcp.SERVER.dhcp_option='3,'$SERVER_ip
uci add_list dhcp.SERVER.dhcp_option='42,'$INET_GW
uci add_list dhcp.SERVER.dhcp_option='15,'$SERVER_domain
uci set dhcp.SERVER.server=$SERVER_ip'#'$DNS_UNBOUND_port
uci set dhcp.SERVER.force='1'

uci set dhcp.VOICE=dhcp
uci set dhcp.VOICE.dhcpv4='server'
uci set dhcp.VOICE.dhcpv6='server'
Expand All @@ -2580,19 +2616,37 @@ uci set dhcp.VOICE.interface='VOICE'
uci set dhcp.VOICE.start='2'
uci set dhcp.VOICE.limit='250'
uci set dhcp.VOICE.leasetime='24h'
uci set dhcp.VOICE.domain=$VOICE_domain
uci set dhcp.VOICE.local='/'$VOICE_domain'/'
#uci add_list dhcp.VOICE.dhcp_option='6,'$VOICE_ip
uci add_list dhcp.VOICE.dhcp_option='6,'$INET_GW
uci add_list dhcp.VOICE.dhcp_option='3,'$VOICE_ip
uci add_list dhcp.VOICE.dhcp_option='42,'$INET_GW
uci add_list dhcp.VOICE.dhcp_option='15,'$HVOICE_domain
uci set dhcp.VOICE.server=$VOICEL_ip'#'$DNS_UNBOUND_port
uci set dhcp.VOICE.force='1'

uci set dhcp.ENTERTAIN=dhcp
uci set dhcp.ENTERTAIN.dhcpv4='server'
uci set dhcp.ENTERTAIN.dhcpv6='server'
uci set dhcp.ENTERTAIN.ra='server'
uci set dhcp.ENTERTAIN.ra_slaac='1'
uci add_list.ENTERTAIN.ra_flags='managed-config'
uci add_list dhcp.ENTERTAIN.ra_flags='managed-config'
uci add_list dhcp.ENTERTAIN.ra_flags='other-config'
uci set dhcp.ENTERTAIN.interface='ENTERTAIN'
uci set dhcp.ENTERTAIN.start='2'
uci set dhcp.ENTERTAIN.limit='250'
uci set dhcp.ENTERTAIN.leasetime='24h'
uci set dhcp.ENTERTAIN.domain=$ENTERTAIN_domain
uci set dhcp.ENTERTAIN.local='/'$ENTERTAIN_domain'/'
#uci add_list dhcp.ENTERTAIN.dhcp_option='6,'$ENTERTAIN_ip
uci add_list dhcp.ENTERTAIN.dhcp_option='6,'$INET_GW
uci add_list dhcp.ENTERTAIN.dhcp_option='3,'$ENTERTAIN_ip
uci add_list dhcp.ENTERTAIN.dhcp_option='42,'$INET_GW
uci add_list dhcp.ENTERTAIN.dhcp_option='15,'$ENTERTAIN_domain
uci set dhcp.ENTERTAIN.server=$ENTERTAIN_ip'#'$DNS_UNBOUND_port
uci set dhcp.ENTERTAIN.force='1'

uci set dhcp.GUEST=dhcp
uci set dhcp.GUEST.dhcpv4='server'
uci set dhcp.GUEST.dhcpv6='server'
Expand All @@ -2604,8 +2658,37 @@ uci set dhcp.GUEST.interface='GUEST'
uci set dhcp.GUEST.start='2'
uci set dhcp.GUEST.limit='250'
uci set dhcp.GUEST.leasetime='24h'
uci set dhcp.GUEST.domain=$GUEST_domain
uci set dhcp.GUEST.local='/'$GUEST_domain'/'
#uci add_list dhcp.GUEST.dhcp_option='6,'$GUEST_ip
uci add_list dhcp.GUEST.dhcp_option='6,'$INET_GW
uci add_list dhcp.GUEST.dhcp_option='3,'$GUEST_ip
uci add_list dhcp.GUEST.dhcp_option='42,'$INET_GW
uci add_list dhcp.GUEST.dhcp_option='15,'$GUEST_domain
uci set dhcp.GUEST.server=$GUEST_ip'#'$DNS_UNBOUND_port
uci set dhcp.GUEST.force='1'

uci set dhcp.CMOVIE=dhcp
uci set dhcp.CMOVIE.dhcpv4='server'
uci set dhcp.CMOVIE.dhcpv6='server'
uci set dhcp.CMOVIE.ra='server'
uci set dhcp.CMOVIE.ra_slaac='1'
uci add_list dhcp.CMOVIE.ra_flags='managed-config'
uci add_list dhcp.CMOVIE.ra_flags='other-config'
uci set dhcp.CMOVIE.interface='CMOVIE'
uci set dhcp.CMOVIE.start='2'
uci set dhcp.CMOVIE.limit='250'
uci set dhcp.CMOVIE.leasetime='24h'
uci set dhcp.CMOVIE.domain=$CMOVIEGUEST_domain
uci set dhcp.CMOVIE.local='/'$CMOVIE_domain'/'
#uci add_list dhcp.CMOVIE.dhcp_option='6,'$CMOVIE_ip
uci add_list dhcp.CMOVIE.dhcp_option='6,'$INET_GW
uci add_list dhcp.CMOVIE.dhcp_option='3,'$CMOVIE_ip
uci add_list dhcp.CMOVIE.dhcp_option='42,'$INET_GW
uci add_list dhcp.CMOVIE.dhcp_option='15,'$CMOVIE_domain
uci set dhcp.CMOVIE.server=$CMOVIE_ip'#'$DNS_UNBOUND_port
uci set dhcp.CMOVIE.force='1'

uci commit && reload_config
/etc/init.d/dnsmasq restart >/dev/null
}
Expand Down

0 comments on commit 2b964ff

Please sign in to comment.