+ Mở port trên linux
iptables -I INPUT -p TCP –dport 7777 -j ACCEPT
service iptables save
+ Check /dev/shm is mounted noexec,nosuid
For the issue of CSF “Check /dev/shm is mounted noexec,nosuid”
Secure ” /dev/shm ” partition :
Edit the file /etc/fstab and replace the following line
tmpfs /dev/shm tmpfs defaults 0 0
with the following line
tmpfs /dev/shm tmpfs noexec,nosuid 0 0
Then run the following commands :
# umount /dev/shm
# mount /dev/shm
+ Check for DNS recursion restrictions
Thêm vào /etc/named.conf:
allow-transfer none; ;
allow-recursion localnets; ;
allow-notify trusted; ;
forwarders 127.0.0.1; ;
Lưu lại. Dùng lệnh:
“service named restart” để khởi động lại Named service
Mở /etc/exim.conf và thêm:
- Tìm : log_selector =
Thêm sau:
+arguments
+subject
+received_recipients
+delivery_size
+sender_on_delivery
+received_sender
+smtp_confirmation
+smtp_incomplete_transaction
Lưu lại. Dùng lệnh:
“service exim restart” để khởi động lại Exim service
+ Check SSH PasswordAuthentication
Mở: /etc/ssh/sshd_config Thêm vào:
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
PubkeyAuthentication yes
- Trong trường hợp đã tồn tại các trường trên thì đổi từ yes sang no
Đổi port SSH:
Vào mở /etc/sshd_config:
Tìm dòng #Port 22 bỏ # thay bằng port mới.
Ví dụ
Port 7896
Sau đó tiến hành mở port này trên IPtables bằng lệnh:
iptables -I INPUT -p TCP –dport 7896 -j ACCEPT
service iptables save
+ Check server startup for rpcbind
service portreserve stop
chkconfig portreserve off
Cấu hình cho CSF - Linux






Không có nhận xét nào:
Đăng nhận xét