Linux Note (1)

Source: Internet
Author: User

-A input-m state--state new-m tcp-p tcp-s dizhi--dport 6379-j ACCEPT
-A input-j REJECT--reject-with icmp-host-prohibited
-A forward-j REJECT--reject-with icmp-host-prohibited
COMMIT
Iptables-a input-p TCP--dport 22-j ACCEPT
CentOS 7
Firewall-cmd--zone=public--add-port=53/udp--permanent
Firewall-cmd--zone=public--remove-port=80/tcp--permanent
Firewall-cmd--zone=public--add-port=4400-4600/udp--permanent
#内核
Cat/proc/version
#版本
Cat/etc/redhat_release
Centos7
Systemctl Status/start/stop Firewalld
CentOS 6
Red Hat serivce iptables Status/stop/start
# Firewall rules
/etc/udev/rules.d/70-persistent-net.rules

1. View open ports (no ports are open by default)
Firewall-cmd--list-ports
2. Turn on port 80
Firewall-cmd--zone=public (Scope)--ADD-PORT=80/TCP (port and Access type)--permanent (permanent)
3. Restart the firewall
Firewall-cmd--reload
4. Stop the firewall
Systemctl Stop Firewalld.service
5. Disable the boot of the firewall
Systemctl Disable Firewalld.service
6. Delete
Firewall-cmd--zone=public--remove-port=80/tcp--permanent
7. White List
Firewall-cmd--add-rich-rule ' rule family= ' IPv4 ' source address= ' * ' Accept '--permanent

/etc/ssh/sshd_config
Rsaauthentication Yes
Pubkeyauthentication Yes
Authorizedkeysfile. Ssh/authorized_keys

#过滤ip
Vim/etc/hosts.allow

Service Services.msc

Linux Note (1)

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.