質問編集履歴

2

結果の追記

2019/12/14 13:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -29,3 +29,75 @@
29
29
  firewall-cmd --reload
30
30
 
31
31
  ```
32
+
33
+
34
+
35
+ ### 追記
36
+
37
+ firewall-cmd --list-all
38
+
39
+ ```
40
+
41
+ public (active)
42
+
43
+ target: default
44
+
45
+ icmp-block-inversion: no
46
+
47
+ interfaces: eth0
48
+
49
+ sources:
50
+
51
+ services: dhcpv6-client http https
52
+
53
+ ports: 2222/tcp
54
+
55
+ protocols:
56
+
57
+ masquerade: no
58
+
59
+ forward-ports:
60
+
61
+ source-ports:
62
+
63
+ icmp-blocks:
64
+
65
+ rich rules:
66
+
67
+ rule family="ipv4" source address="XX.XX.XX.XX" port port="2222" protocol="tcp" accept
68
+
69
+ ```
70
+
71
+ /etc/firewalld/zones/public.xml
72
+
73
+ ```xml
74
+
75
+ <?xml version="1.0" encoding="utf-8"?>
76
+
77
+ <zone>
78
+
79
+ <short>Public</short>
80
+
81
+ <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
82
+
83
+ <service name="dhcpv6-client"/>
84
+
85
+ <service name="http"/>
86
+
87
+ <service name="https"/>
88
+
89
+ <port protocol="tcp" port="2222"/>
90
+
91
+ <rule family="ipv4">
92
+
93
+ <source address="XX.XX.XX.XX"/>
94
+
95
+ <port protocol="tcp" port="2222"/>
96
+
97
+ <accept/>
98
+
99
+ </rule>
100
+
101
+ </zone>
102
+
103
+ ```

1

誤字

2019/12/14 13:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  firewall-cmd --permanent --zone=public --add-service=https
22
22
 
23
- firewall-cmd --permanent --add-port=3939/tcp
23
+ firewall-cmd --permanent --add-port=2222/tcp
24
24
 
25
25
  firewall-cmd --remove-service=ssh --zone=public --permanent
26
26