CSF Installtion issue in cPanel/WHm - cpanel

I have installed csf on cPanel/whm successfully but my problem is when I enable csf firewall. It blocks all incoming and outgoing requests so, no one can open their domain name, ftp nor anything. I have no clue about it so I'd really appreciate if someone can guide me step by step to configure csf in cPanel/whm.

make sure below setting in your csf.conf
TESTING = "0"
TESTING_INTERVAL = Default: 5
TCP_IN = 20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,26
TCP_OUT = 20,21,22,25,37,43,53,80,110,113,443,587,873,2087,2089,2703,3306
UDP_IN = 20,21,53
UDP_OUT = 20,21,53,113,123,873,6277
ICMP_IN = Default: 1
ICMP_OUT = Default: 1
SMTP_PORTS = 25 36

Related

MongooseIM mod_event_pusher RabbitMQ

I trying to understand MongooseIM file configuration ( not easy , this is my point of view ) I spent 2 days to understand how I can config mod_event_pusher & RabbitMQ but not working
This is my config
[auth]
methods = ["http"]
password.format = "plain"
sasl_mechanisms = ["plain"]
[auth.http]
[outgoing_pools.http.auth.connection]
host = "https://---------------"
[outgoing_pools.rabbit.event_pusher.connection]
amqp_host = "---------damqp.com"
amqp_port = 1883
amqp_username = "---------"
amqp_password = "eld_8NZ_________DY8x"
But when I execute ./bin/mongooseimctl live I have some error like
Could not read the TOML configuration file
If someone have an example , it will be great .
The provided configuration file is missing the general section. This section is mandatory because it contains the list of hosts that the server is handling and the default_server_domain, see the documentation.

Enabling MT_SERVICE results in Internal Server error

Regardless of which MT_SERVICES I try to enable in settings.py, after restating Apache, I get an Internal Server error when accessing the site.
I tried to enable one or two services, but did always get the same problem.
I tried enabling different services. Nothing worked. When I remove the MT_SERVICES, everything is back to normal.
MT_SERVICES = (
'weblate.machinery.deepl.DeepLTranslation',
'weblate.machinery.saptranslationhub.SAPTranslationHub',
)
MT_DEEPL_KEY = xxxxxx
MT_SAP_BASE_URL = xxxxxx
MT_SAP_SANDBOX_APIKEY
MT_SAP_USERNAME = xxxxxx
MT_SAP_PASSWORD = xxxxxx
MT_SAP_USE_MT = True
Result:
Error: Internal Server Error

lsyncd doesn't respect ssh user when deleting files

We have setup lsyncd to sync data between two hosts. The ssh connection is configured to use user tomcat with the matching id_rsa identity file. For some reason a append/create on the remote works fine, but deleting doesn't work. When rsync tries to delete a file, the root user is used to connect to the destination host and not the tomcat user (which is used for create/append).
In the logs (/var/log/lsyncd/lsyncd.log) we see:
Wed Feb 15 13:48:24 2017 Normal: Rsyncing list
/test.txt
Wed Feb 15 13:48:26 2017 Normal: Finished (list): 0
Wed Feb 15 13:48:34 2017 Normal: Deleting list
/myfolder//test.txt
Received disconnect from 10.29.146.78: 2: Too many authentication failures for root
Wed Feb 15 13:48:41 2017 Normal: Retrying (list): 255
We use the below configuration (/etc/lsyncd.conf):
settings{
pidfile = "/var/run/lsyncd.pid",
statusFile = "/var/tmp/lsyncd.status",
logfile = "/var/log/lsyncd/lsyncd.log",
statusInterval = 60,
logfacility = "user",
logident = "lsyncd",
inotifyMode = "CloseWrite",
maxProcesses = 10,
}
sync {
default.rsyncssh,
source = "/myfolder/",
delete = true,
host = "remote-host",
targetdir = "/myfolder/",
excludeFrom = "/etc/lsyncd/lsyncd.exclude",
delay = 5,
rsync = {
binary = "/usr/bin/rsync",
archive = true,
owner = true,
compress = true,
_extra = { "--bwlimit=50000", "--delete-after" },
rsh = "/usr/bin/ssh -l tomcat -i /usr/share/tomcat6/.ssh/id_rsa",
}
}
As a workaround we can use a /root/.ssh/config file with:
Host remote-host
Hostname remote-host
User tomcat
IdentityFile /usr/share/tomcat6/.ssh/id_rsa
Of course we would rather not have to use this since it should work with the lsyncd.conf configuration.
We're using lsyncd version 2.1.4
The following issue on GitHub helped to me solve the same problem:
https://github.com/axkibe/lsyncd/issues/369
What I did was quite simple, I just replaced default.rsyncssh with default.rsync in lysync.conf.lua file
When using rsyncssh, one has to be careful.
The "ssh {}" configuration parameter has its own "binary", "port", "_extra". See documentation for complete list of settings.
It is a little confusing because "rsync {}" also needs to be configured. Yes, both sections need to be done.
The "ssh" section is used for delete and move events. The "rsync" section is used for file transfer.
One might avoid the confusion by using rsync instead of rsyncssh. But, you would lose the bandwidth efficiency that rsyncssh provides when files get moved.

LDAP configuration for Gerrit?

Since google has stopped the openID support for gerrit, i am trying to use LDAP for the same now. I have IP and port number of the LDAP server. But i don't know how to start now.
I also need help to update my etc/gerrit_config file:
[auth]
type = ldap
[ldap]
server = ldap://[IP]
accountBase = ou=people,dc=domain,dc=com
groupBase = ou=groups,dc=domain,dc=com
referral = follow
accountPattern = (uid=${username})
groupPattern = (cn=${groupname})
accountFullName = cn
accountMemberField = memberOf
accountEmailAddress = mail
Since i am a newbie for ldap, could someone please help me in the same.
Thanks!!
At work I am running a gerrit instance that uses one of our work LDAPs for authentication. I use a configuration like this:
[ldap]
server = ldap://xxx.OurDomain.com
username = CN=ldapread,DC=OurDomain,DC=com
password = NotShownHere
accountBase = DC=OurDomain,DC=com
groupBase = DC=OurDomain,DC=com
The key point is that you need an LDAP user that is permitted to read from the LDAP and put the coordinates of that user into the config.
In our case, I obtained these coordinates from a know to work Apache httpd config file. In your case, you may have to ask your LDAP admin for suitable credentials.

php can't delete files on mounted samba share -permissions

My hair is going gray (or grayer that usual) trying to solve this riddle.
running: ubuntu 12.04 LTS
I want a PHP script (executed by apache) to delete a directory with all it's containing files in a cifs mounted directory. But I get "Permission denied".
The file is created by another samba client.
I have tried and tried , all different kinds of settings, but now I need some fresh eyes
Any comment appreciated
B.R Lars
the file:
-rw-rw-rw- 1 countmaster countmaster 60897298 Sep 25 12:13 row_15.52.gz
the containing directory:
drwxrwxr-x 2 countmaster countmaster 4096 Sep 25 13:34 SYNFR1.14247NEVB.1405281044/
the server smb.conf (i've used the default with slight modifications):
[global]
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
guest account = countmaster
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[share]
comment = Countmaster File Server Share
path = /nfs/countdata
read only = No
writeable =YES
create mask = 0777
force directory mode = 0755
guest ok = Yes
The client /etc/fstab:
//192.168.1.10/share /home/countserver/public_html/countdata cifs auto,users,noperm,rw,guest,exec,actimeo=0 0 0