Opening port in centos7

Hi,

I am verymuch a FreeBSD guy and I am trying to learn xcp-ng which is centos…
I was told to open port tcp 6640 in order to get open vSwitch to work.
So I googled it and it turn how that there are many many ways of opening a port…
I found this
iptables -I INPUT -p tcp --dport 6640 -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --dport 6640 -j ACCEPT
But could anyone please tell me what is a correct and secure wau to open port 6640 on the xcp-ng iptables?

Thank you

I also found this one

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 6640 -j ACCEPT

Can you explain what you are trying to do specifically? I’ve never had to open any ports on my xcp-hypervisor but rather the VM’s themselves.

Hi,

You are right the port 3as already open. It look like my setup has gone to a mess and the xcn developer invited to open a ti ket which I did. Il keep you guys posted with the end resolution