local virtualbox + linux => server
another linux => client
위 환경으로 TCP socket 통신 테스트를 하는데 server 쪽에서 accept이 안되는 문제가 있어서 삽질하다 결국 server 측의 port가 open되지 않아서 생긴문제였다. 그래서 아래와 같이 chatgpt에게 물어봐서 해결하였다.
$ firewall-cmd --zone=public --add-port=9000/tcp --permanent
$ firewall-cmd --reload
* 확인방법
$ firewall-cmd --list-ports
3306/tcp 9000/tcp
[DEV][ root@localhost /root ]
$ vi /etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
<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>
<service name="ssh"/>
<service name="dhcpv6-client"/>
<port protocol="tcp" port="3306"/>
<port protocol="tcp" port="9000"/>
</zone>