質問編集履歴
2
s
test
CHANGED
File without changes
|
test
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
|
90
90
|
|
91
|
-
-A INPUT -p tcp --dport 1
|
91
|
+
-A INPUT -p tcp --dport 12345 -j ACCEPT
|
92
92
|
|
93
93
|
-A INPUT -p tcp --dport 22222 -j ACCEPT
|
94
94
|
|
1
s
test
CHANGED
File without changes
|
test
CHANGED
@@ -25,3 +25,75 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
SSHでサーバにログインする際だけ使って、他の箇所では使わないようにしたいです
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
VirtualHostは以下のような設定
|
36
|
+
|
37
|
+
```ここに言語を入力
|
38
|
+
|
39
|
+
Listen 22222
|
40
|
+
|
41
|
+
Listen 12345 //他でつかうポート
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
httpd は以下のような設定
|
46
|
+
|
47
|
+
```ここに言語を入力
|
48
|
+
|
49
|
+
PORT 22222
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
iptables
|
54
|
+
|
55
|
+
```ここに言語を入力
|
56
|
+
|
57
|
+
*filter
|
58
|
+
|
59
|
+
:INPUT DROP [0:0]
|
60
|
+
|
61
|
+
:FORWARD DROP [0:0]
|
62
|
+
|
63
|
+
:OUTPUT ACCEPT [0:0]
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
-A INPUT -i lo -j ACCEPT
|
68
|
+
|
69
|
+
-A INPUT -p tcp --tcp-flags ALL NONE -j DROP
|
70
|
+
|
71
|
+
-A INPUT -p tcp ! --syn -m state --state NEW -j DROP
|
72
|
+
|
73
|
+
-A INPUT -p tcp --tcp-flags ALL ALL -j DROP
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
-A INPUT -p icmp --icmp-type echo-request -m hashlimit --hashlimit-name t_icmp --hashlimit 1/m --hashlimit-burst 10 --hashlimit-mode srcip --hashlimit-htable-expire 120000 -j ACCEPT
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
-A INPUT -p udp --sport 53 -j ACCEPT
|
86
|
+
|
87
|
+
-A INPUT -p tcp -m state --syn --state NEW --dport 22 -m hashlimit --hashlimit-name t_sshd --hashlimit 1/m --hashlimit-burst 10 --hashlimit-mode srcip --hashlimit-htable-expire 120000 -j ACCEPT
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
-A INPUT -p tcp --dport 11111 -j ACCEPT
|
92
|
+
|
93
|
+
-A INPUT -p tcp --dport 22222 -j ACCEPT
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
COMMIT
|
98
|
+
|
99
|
+
```
|