Changes between Version 8 and Version 9 of HowTo/SakuraVpsSetup3
- Timestamp:
- Apr 29, 2017, 6:47:06 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowTo/SakuraVpsSetup3
v8 v9 138 138 /sbin/iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable 139 139 /sbin/iptables -A FORWARD -j REJECT --reject-with icmp-port-unreachable 140 141 # SNMP blocking 142 /sbin/iptables -A OUTPUT -m udp -p udp -m multiport --dports 161,162 -j REJECT --reject-with icmp-port-unreachable 140 143 }}} 141 144 {{{ … … 164 167 /sbin/ip6tables -A INPUT -j REJECT --reject-with icmp6-port-unreachable 165 168 /sbin/ip6tables -A FORWARD -j REJECT --reject-with icmp6-port-unreachable 169 170 # SNMP blocking 171 /sbin/ip6tables -A OUTPUT -m udp -p udp -m multiport --dports 161,162 -j REJECT --reject-with icmp6-port-unreachable 166 172 }}} 167 173 {{{ … … 186 192 Chain OUTPUT (policy ACCEPT) 187 193 target prot opt source destination 194 REJECT udp -- 0.0.0.0/0 0.0.0.0/0 udp multiport dports 161,162 reject-with icmp-port-unreachable 188 195 # ip6tables -L -n 189 196 Chain INPUT (policy ACCEPT) … … 201 208 Chain OUTPUT (policy ACCEPT) 202 209 target prot opt source destination 203 # 210 REJECT udp ::/0 ::/0 udp multiport dports 161,162 reject-with icmp6-port-unreachable 211 # 204 212 }}} 205 213 1. iptables-persistent をインストールし、iptables の設定を保存する … … 211 219 {{{ 212 220 # cat /etc/iptables/rules.v4 213 # Generated by iptables-save v1.6.0 on Fri Apr 28 17:47:412017221 # Generated by iptables-save v1.6.0 on Sat Apr 29 06:40:35 2017 214 222 *filter 215 223 :INPUT ACCEPT [0:0] 216 224 :FORWARD ACCEPT [0:0] 217 :OUTPUT ACCEPT [2 34:24432]225 :OUTPUT ACCEPT [283:43644] 218 226 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 219 227 -A INPUT -p icmp -j ACCEPT … … 222 230 -A INPUT -j REJECT --reject-with icmp-port-unreachable 223 231 -A FORWARD -j REJECT --reject-with icmp-port-unreachable 232 -A OUTPUT -p udp -m udp -m multiport --dports 161,162 -j REJECT --reject-with icmp-port-unreachable 224 233 COMMIT 225 # Completed on Fri Apr 28 17:47:412017234 # Completed on Sat Apr 29 06:40:35 2017 226 235 # cat /etc/iptables/rules.v6 227 # Generated by ip6tables-save v1.6.0 on Fri Apr 28 17:47:412017236 # Generated by ip6tables-save v1.6.0 on Sat Apr 29 06:40:35 2017 228 237 *filter 229 238 :INPUT ACCEPT [0:0] 230 239 :FORWARD ACCEPT [0:0] 231 :OUTPUT ACCEPT [ 106:10896]240 :OUTPUT ACCEPT [0:0] 232 241 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 233 242 -A INPUT -p icmp -j ACCEPT … … 236 245 -A INPUT -j REJECT --reject-with icmp6-port-unreachable 237 246 -A FORWARD -j REJECT --reject-with icmp6-port-unreachable 247 -A OUTPUT -p udp -m udp -m multiport --dports 161,162 -j REJECT --reject-with icmp6-port-unreachable 238 248 COMMIT 239 # Completed on Fri Apr 28 17:47:412017240 # 249 # Completed on Sat Apr 29 06:40:35 2017 250 # 241 251 }}} 242 252