|
@@ -4,15 +4,38 @@
|
|
|
/sbin/iptables -A OUTPUT -p all -s any/0 -d 8.8.8.8/255.255.255.255 -j ACCEPT
|
|
|
/sbin/iptables -A OUTPUT -p all -s any/0 -d 180.76.76.76/255.255.255.255 -j ACCEPT
|
|
|
/sbin/iptables -A OUTPUT -p all -s any/0 -d evsocket.phihong.com.tw/255.255.255.255 -j ACCEPT
|
|
|
-/sbin/iptables -A OUTPUT -p all -s any/0 -d git.phihong.com.tw/255.255.255.255 -j ACCEPT
|
|
|
+/sbin/iptables -A OUTPUT -p all -s any/0 -d ocpp.phihong.com.tw/255.255.255.255 -j ACCEPT
|
|
|
/sbin/iptables -A OUTPUT -p all -s any/0 -d ftp.phihong.com.tw/255.255.255.255 -j ACCEPT
|
|
|
-/sbin/iptables -A OUTPUT -p all -s any/0 -d $1/255.255.255.255 -j ACCEPT
|
|
|
+/sbin/iptables -A OUTPUT -p all -s any/0 -d time.windows.com/255.255.255.255 -j ACCEPT
|
|
|
+/sbin/iptables -A OUTPUT -p all -s any/0 -d cn.ntp.org.cn/255.255.255.255 -j ACCEPT
|
|
|
+/sbin/iptables -A OUTPUT -p all -s any/0 -d tock.stdtime.gov.tw/255.255.255.255 -j ACCEPT
|
|
|
+/sbin/iptables -A OUTPUT -p all -s any/0 -d 0.europe.pool.ntp.org/255.255.255.255 -j ACCEPT
|
|
|
+if [ $# -eq 1 ]; then
|
|
|
+ /sbin/iptables -A OUTPUT -p all -s any/0 -d $1/255.255.255.255 -j ACCEPT
|
|
|
+fi
|
|
|
+
|
|
|
+if [ $# -eq 2 ]; then
|
|
|
+ /sbin/iptables -A OUTPUT -p all -s any/0 -d $1/255.255.255.255 -j ACCEPT
|
|
|
+ /sbin/iptables -A OUTPUT -p all -s any/0 -d $2/255.255.255.255 -j ACCEPT
|
|
|
+fi
|
|
|
/sbin/iptables -A OUTPUT -p all -s any/0 -d any/0 -j DROP
|
|
|
+
|
|
|
/sbin/iptables -A INPUT -p all -s 192.168.0.0/255.255.0.0 -d any/0 -j ACCEPT
|
|
|
/sbin/iptables -A INPUT -p all -s 8.8.8.8/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
/sbin/iptables -A INPUT -p all -s 180.76.76.76/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
/sbin/iptables -A INPUT -p all -s evsocket.phihong.com.tw/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
-/sbin/iptables -A INPUT -p all -s git.phihong.com.tw/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+/sbin/iptables -A INPUT -p all -s ocpp.phihong.com.tw/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
/sbin/iptables -A INPUT -p all -s ftp.phihong.com.tw/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
-/sbin/iptables -A INPUT -p all -s $1/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+/sbin/iptables -A INPUT -p all -s time.windows.com/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+/sbin/iptables -A INPUT -p all -s cn.ntp.org.cn/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+/sbin/iptables -A INPUT -p all -s tock.stdtime.gov.tw/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+/sbin/iptables -A INPUT -p all -s 0.europe.pool.ntp.org/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+if [ $# -eq 1 ]; then
|
|
|
+ /sbin/iptables -A INPUT -p all -s $1/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+fi
|
|
|
+
|
|
|
+if [ $# -eq 2 ]; then
|
|
|
+ /sbin/iptables -A INPUT -p all -s $1/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+ /sbin/iptables -A INPUT -p all -s $2/255.255.255.255 -d any/0 -j ACCEPT
|
|
|
+fi
|
|
|
/sbin/iptables -A INPUT -p all -s any/0 -d any/0 -j DROP
|