Support local NTP Server.
This commit is contained in:
parent
70f62dc7fa
commit
142778c718
@ -199,6 +199,21 @@ forward_vpn_server_ips=""
|
|||||||
vpn_ports="$standard_vpn_port"
|
vpn_ports="$standard_vpn_port"
|
||||||
|
|
||||||
|
|
||||||
|
# local NTP Server
|
||||||
|
#
|
||||||
|
local_ntp_service=false
|
||||||
|
|
||||||
|
# NPT Port used by local service
|
||||||
|
#
|
||||||
|
ntp_port="$standard_ntp_port"
|
||||||
|
|
||||||
|
# Network allowed for NTP requests
|
||||||
|
#
|
||||||
|
# Note: if not set no port will be open!
|
||||||
|
#
|
||||||
|
ntp_allowed_net=""
|
||||||
|
|
||||||
|
|
||||||
# DHCP Server
|
# DHCP Server
|
||||||
#
|
#
|
||||||
# Comma seperated Interface list for DHCP services
|
# Comma seperated Interface list for DHCP services
|
||||||
|
@ -212,6 +212,24 @@ forward_vpn_server_ips=""
|
|||||||
vpn_ports="$standard_vpn_port"
|
vpn_ports="$standard_vpn_port"
|
||||||
|
|
||||||
|
|
||||||
|
# local NTP Server
|
||||||
|
#
|
||||||
|
local_ntp_service=false
|
||||||
|
|
||||||
|
# NPT Port used by local service
|
||||||
|
#
|
||||||
|
ntp_port="$standard_ntp_port"
|
||||||
|
|
||||||
|
# Network allowed for NTP requests
|
||||||
|
#
|
||||||
|
# Note: if not set no port will be open!
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# ntp_allowed_net="2001:678:a40:3000::/64"
|
||||||
|
#
|
||||||
|
ntp_allowed_net=""
|
||||||
|
|
||||||
|
|
||||||
# DHCP Server
|
# DHCP Server
|
||||||
#
|
#
|
||||||
# Comma seperated Interface list for DHCP services
|
# Comma seperated Interface list for DHCP services
|
||||||
|
@ -1685,6 +1685,24 @@ done
|
|||||||
echo_done
|
echo_done
|
||||||
|
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# - NTP local Service"
|
||||||
|
# ---
|
||||||
|
|
||||||
|
echononl "\t\tNTP local Service"
|
||||||
|
if [[ -n $local_ntp_service ]] && $local_ntp_service ; then
|
||||||
|
if [[ -z "$ntp_allowed_net" ]] ; then
|
||||||
|
echo_failed
|
||||||
|
else
|
||||||
|
$ip6t -A OUTPUT -p udp -d $ntp_allowed_net --dport $ntp_port -m conntrack --ctstate NEW -j ACCEPT
|
||||||
|
$ip6t -A INPUT -p udp -s $ntp_allowed_net --dport $ntp_port -m conntrack --ctstate NEW -j ACCEPT
|
||||||
|
echo_done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo_skipped
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# - Whois out only
|
# - Whois out only
|
||||||
# ---
|
# ---
|
||||||
|
@ -1929,6 +1929,26 @@ done
|
|||||||
echo_done
|
echo_done
|
||||||
|
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# - NTP local Service"
|
||||||
|
# ---
|
||||||
|
|
||||||
|
echononl "\t\tNTP local Service"
|
||||||
|
if [[ -n $local_ntp_service ]] && $local_ntp_service ; then
|
||||||
|
if [[ -z "$ntp_allowed_net" ]] ; then
|
||||||
|
echo_failed
|
||||||
|
else
|
||||||
|
$ipt -A OUTPUT -p udp -d $ntp_allowed_net --dport $ntp_port -m conntrack --ctstate NEW -j ACCEPT
|
||||||
|
$ipt -A INPUT -p udp -s $ntp_allowed_net --dport $ntp_port -m conntrack --ctstate NEW -j ACCEPT
|
||||||
|
echo_done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo_skipped
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# - Whois out only
|
# - Whois out only
|
||||||
# ---
|
# ---
|
||||||
|
Loading…
Reference in New Issue
Block a user