Command to check if X port is open in IPTABLES and check if open in CSF?
Hi.
If X command is CLOSED in IPTABLES, but OPEN in rules of CSF = port no accesible
If X command is OPEN in IPTABLES, but CLOSED in rules of CSF = port no accesible
Then... Please:
With what command I check if X port is open/closed in IPTABLES ???
With what command I check if X port is open/closed in CSF ???
Thanks
-
Re: Command to check if X port is open in IPTABLES and OTHER command to check if is open in CSF - Th [quote="000, post: 1582932">Hi. If X command is CLOSED in IPTABLES, but OPEN in rules of CSF = port no accesible If X command is OPEN in IPTABLES, but CLOSED in rules of CSF = port no accesible Then... Please: With what command I check if X port is open/closed in IPTABLES ??? With what command I check if X port is open/closed in CSF ??? Thanks
CSF is simply a GUI for the IPTABLES firewall on the server. If the port is open or blocked in one, it should be the same status in the other. Try using nmap to scan the ports. EX: nmap -Pn $IP -p $PORT0 -
Re: Command to check if X port is open in IPTABLES and OTHER command to check if is open in CSF - Th [quote="cPMelaniel, post: 1582991">If the port is open or blocked in one, it should be the same status in the other.
Thanks. I like detect if X port is blocked BY CSF or BY IPTABLES. By this I like a command similar to: csf -status_of_ -portX iptables -status_of_ -portX to I can detect if port is BLOCKED by IPTABLES, by CSF or by BOTH0 -
Re: Command to check if X port is open in IPTABLES and OTHER command to check if is open in CSF - Th CSF just manages IPtables. If something is blocked in CSF, CSF blocks it by making an iptables rule. You can make your own iptables rules outside of CSF using some of it's included files/configuration, but you should know if you have done this. If you restart CSF it creates all your iptables rules based on CSF config. There should not be differences. You can just run this to see all the actual iptables rules, but there will be a lot if you use LFD blocking: iptables -L -n0 -
Re: Command to check if X port is open in IPTABLES and OTHER command to check if is open in CSF - Th [quote="quizknows, post: 1584012"> iptables -L -n
Thanks. This show just ALL RULES... I need samplely know if X port is open, and this show all rules...0 -
Re: Command to check if X port is open in IPTABLES and OTHER command to check if is open in CSF - Th Hello, Check the port status in iptables with the following command iptables -L -n | grep :PORT0 -
iptables -L -n | grep :PORT
Thanks master[root@cia docker-jitsi-meet]# iptables -L -n | grep :443 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW tcp dpt:443 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW tcp dpt:443 ACCEPT tcp -- 0.0.0.0/0 172.18.0.2 tcp dpt:443 [root@cia docker-jitsi-meet]# iptables -L -n | grep :10000 ACCEPT udp -- 0.0.0.0/0 172.18.0.5 udp dpt:10000 [root@cia docker-jitsi-meet]# iptables -L -n | grep :21 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW tcp dpt:21 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW udp dpt:21 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW tcp dpt:21 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW udp dpt:21 [root@cia docker-jitsi-meet]#0
Please sign in to leave a comment.
Comments
6 comments