선 밖에 선 자유인

firewalld 설정 본문

IT/System & Network

firewalld 설정

Hotman 2017. 1. 17. 10:33

- /etc/firewalld/zones/public.xml


# service open

  <service name="http"/>

  <service name="ssh"/>

  <service name="https"/>


# 포트별 (service name or port name)

  <rule family="ipv4">

    <source address="192.168.0.0/24"/>

    <port protocol="tcp" port="9300"/>

    <accept/>

  </rule>

  <rule family="ipv4">

    <source address="192.168.0.0/24"/>

    <service name="syslog"/>

    <accept/>

  </rule>


# 수동으로 강제 추가

[root@test]# firewall-cmd --add-rich-rule='rule family="ipv4" source address="192.168.0.0/24" service name="syslog" accept' --permanent


# reload

[root@test]# firewall-cmd --reload


Comments