Dynamic domain name Security SSH to prevent malicious Login

Source: Internet
Author: User

First, apply for a free domain name from the peanut shell or other dynamic domain names.

1. Write the rules on the server to prevent SSH connection failure.

-A input DROP-A INPUT-p tcp -- dport 80-j ACCEPT-A INPUT-p tcp -- dport 22-s finy. hhks. cc-j ACCEPT

2. Direct the IP address of the domain name to the IP address of your current office

3. the cron task refreshes the IP address of the domain name once every five minutes.

#! /Bin/bashiptable =/etc/init. d/iptablesrestart () {$ iptables restart} restartvi/etc/cron */5 *****/usr/iptables_scripts/iptables. sh

4. Can the domain name be correctly resolved?

Ping finy. hhks. cc

The actual IP address is consistent.

In this way, except that your domain name IP Address can access your server's SSH, it will not work, and it is useful to deal with profiteering cracking.

Refresh the IP record of the dynamic domain name once every 5 minutes.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.