teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

結果の追記

2019/12/14 13:42

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -13,4 +13,40 @@
13
13
  firewall-cmd --remove-service=ssh --zone=public --permanent
14
14
  firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="XX.XX.XX.XX" port protocol="tcp" port="2222" accept"
15
15
  firewall-cmd --reload
16
+ ```
17
+
18
+ ### 追記
19
+ firewall-cmd --list-all
20
+ ```
21
+ public (active)
22
+ target: default
23
+ icmp-block-inversion: no
24
+ interfaces: eth0
25
+ sources:
26
+ services: dhcpv6-client http https
27
+ ports: 2222/tcp
28
+ protocols:
29
+ masquerade: no
30
+ forward-ports:
31
+ source-ports:
32
+ icmp-blocks:
33
+ rich rules:
34
+ rule family="ipv4" source address="XX.XX.XX.XX" port port="2222" protocol="tcp" accept
35
+ ```
36
+ /etc/firewalld/zones/public.xml
37
+ ```xml
38
+ <?xml version="1.0" encoding="utf-8"?>
39
+ <zone>
40
+ <short>Public</short>
41
+ <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>
42
+ <service name="dhcpv6-client"/>
43
+ <service name="http"/>
44
+ <service name="https"/>
45
+ <port protocol="tcp" port="2222"/>
46
+ <rule family="ipv4">
47
+ <source address="XX.XX.XX.XX"/>
48
+ <port protocol="tcp" port="2222"/>
49
+ <accept/>
50
+ </rule>
51
+ </zone>
16
52
  ```

1

誤字

2019/12/14 13:42

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -9,7 +9,7 @@
9
9
  ```
10
10
  firewall-cmd --permanent --zone=public --add-service=http
11
11
  firewall-cmd --permanent --zone=public --add-service=https
12
- firewall-cmd --permanent --add-port=3939/tcp
12
+ firewall-cmd --permanent --add-port=2222/tcp
13
13
  firewall-cmd --remove-service=ssh --zone=public --permanent
14
14
  firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="XX.XX.XX.XX" port protocol="tcp" port="2222" accept"
15
15
  firewall-cmd --reload