Page 1 of 1

Do I have the correct s/d for csf.allow?

Posted: 03 Jan 2019, 17:15
by GazCBG
Hi,

I have 2 IPs on my server running Ubuntu 18.04 LTS for this post I will call the IPs 1.1.1.1 and 2.2.2.2

I would like to have use 2.2.2.2 for TeamSpeak 3 and need to option some TCP and UDP ports for it to all work.
I read I can open the ports using csf.allow but not sure how to allow the IP only to thoses ports

These are the ports I need to open only for the IP 2.2.2.2.
TCP In: 2008,10011,30033,41144
TCP Out: 2008,10011,30033,41144
UDP In: 9987
UDP Out: 2011:2110

Now here the bit I get lost with the s/d for the port and ip.
Have I got the below correct?

tcp|in|d=2008,10011,30033,41144|d=2.2.2.2
tcp|out|d=2008,10011,30033,41144|s=2.2.2.2

udp|in|d=9987|d=2.2.2.2
udp|out|d=2011_2110|s=2.2.2.2

Thanks

Re: Do I have the correct s/d for csf.allow?

Posted: 15 May 2019, 01:37
by touchara
The advanced format is for blocking the IP only from a certain port. Normal format is to just have the IP in csf.deny which blocks it from the server entirely.
https://thegadgetwire.com/tutuapp/ https://www.oovoo.onl/adam4adam/ https://thegadgetwire.com/appvalley/
The same advanced syntax can be used to open specific ports for certain IP addresses as well. Adding an IP to csf.allow normally opens all ports to that IP address. Adding an IP to csf.ignore simply allows the IP to be ignored from brute force detection (LFD) without opening up the extra ports.
GOOD LUCK