Home > Backend Development > PHP Tutorial > memcache security related

memcache security related

藏色散人
Release: 2023-04-06 20:06:01
forward
3099 people have browsed it

Memcache itself does not have a permission control module, so the memcache service open to the external network is easily scanned and discovered by attackers. Sensitive information in memcache can be directly read through command interaction.

To solve this problem, you can follow the following solutions:

1. Memcache is not provided for external network access

memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 -c 1024 -P /tmp/memcached.pid
Copy after login

2. Memcache needs to be provided for external network access Open the firewall for network access

iptables -A INPUT -p tcp -s 192.168.0.2 --dport 11211 -j ACCEPT
Copy after login

The above rules mean that only the ip 192.168.0.2 is allowed to access port 11211.

The above is the detailed content of memcache security related. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:hcoder.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template