Dynamic Domain name security ssh to prevent malicious landing

Source: Internet
Author: User
Tags ssh iptables

First go to peanut shells or other dynamic domain names to apply for a free domain name.

1, the server first write the rules to prevent direct access to the SSH


-A Input-p TCP--dport 80-j ACCEPT

-A Input-p TCP--dport 22-s finy.hhks.cc-j ACCEPT

2, the IP of the domain to point to your current office IP

3,cron task five minutes to refresh the IP of the domain name once



Restart () {

$iptables restart




*/5 * * * */usr/iptables_scripts/iptables.sh

4, is not the correct domain name can be resolved

Ping finy.hhks.cc

Look at your actual IP consistent

So in addition to your domain IP can access your server SSH other is not, to deal with profiteering cracking is very useful.

5 minutes to refresh the IP record of the dynamic domain name once.

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.