Настроить фаервол на сервере nginx
Есть сервер дедик на nginx. Администрация сервера забрасывает письмами, в которых насколько я понимаю она жалуется, что на сервере торчит наружу Redis или memcached и просит это исправить. Насколько я понимаю надо настроить фаервол (iptables), чтоб оно не торчало наружу. Видимо нужно закрыть для подключений извне все порты кроме 80, 22 и какие там еще используются. Но я не уверен и вообще не умею настраивать фаервол. Тут нужна помощь специалиста.
Вот собственно текст письма, который приходит от администрации:
Dear Sir or Madam
Memcached[1] is an open source cache server which is used to store and
retrieve data from memory easily. Memcached is frequently used in
connection with web applications. The memcached server does not support
any authentication, so that attackers have unrestricted access to the data
stored in the cache if the server is reachable from the Internet. This
makes it possible for attackers to potentially spy out information from
the systems which are affected, such as login data for web applications
or other confidential content.
Memcached servers have been identified by the Shadowserver 'Open Memcached
Key-Value Store Scanning Project'[2] which are openly accessible from the
Internet.
We are sending you the following list of affected systems in your net area.
The timestamp (UTC time zone) shows when the system was checked and when
an open memcached server was identified.
We kindly request that you examine the situation and take measures to
safeguard the memcached servers on the systems concerned or inform your
customer accordingly.
References:
[1] Memcached
[2] Shadowserver: Open Memcached Key-Value Store Scanning Project