当前位置:网站首页>Install iptables services and open ports
Install iptables services and open ports
2022-06-12 08:27:00 【Dyansts】
1. solve firewalld
[[email protected] mysql]# systemctl stop firewalld.service;
[[email protected] mysql]# systemctl disable firewalld.service;
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] mysql]# systemctl mask firewalld.service;
Created symlink /etc/systemd/system/firewalld.service → /dev/null.2. install iptables-services
Note check yum Update :yum check update
yum -y install iptables-services// To configure date file
[[email protected] ~]# systemctl enable iptables;
Created symlink /etc/systemd/system/basic.target.wants/iptables.service → /usr/lib/systemd/system/iptables.service.
// Start the service
[[email protected] ~]# systemctl start iptables;3. Open ports
[[email protected] ~]# vim /etc/sysconfig/iptables
========================================================================
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8090 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
among 443 Is an open port 4. Restart the service
[[email protected] ~]# systemctl restart iptables.service
[[email protected] ~]# systemctl enable iptables.service边栏推荐
- (P14) use of the override keyword
- The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem
- (P40-P41)move资源的转移、forward完美转发
- 工厂的生产效益,MES系统如何提供?
- ctfshow web 1-2
- ctfshow web 1-2
- Webrtc adding third-party libraries
- Hands on deep learning -- concise implementation code of weight decay
- Project sorting of niuke.com
- What exactly is APS? You will know after reading the article
猜你喜欢

MES帮助企业智能化改造,提高企业生产透明度

FPGA implementation of right and left flipping of 720p image

KAtex problem of vscade: parseerror: KAtex parse error: can't use function '$' in math mode at position

Discrete chapter I

Prediction of COVID-19 by RNN network

MATLAB image processing -- image transformation correction second-order fitting

What kind of sparks will be generated when the remote sensing satellite meets the Beidou navigation satellite?

Hands on deep learning -- Introduction to linear regression model

模型压缩 | TIP 2022 - 蒸馏位置自适应:Spot-adaptive Knowledge Distillation

Bean的作用域
随机推荐
DUF:Deep Video Super-Resolution Network Using Dynamic Upsampling Filters ... Reading notes
Project sorting of niuke.com
JVM学习笔记:垃圾回收机制
vm虛擬機中使用NAT模式特別說明
【动态内存管理】malloc&calloc和realloc和笔试题和柔性数组
牛客网的项目梳理
APS软件有哪些排程规则?有何异常处理方案?
Hands on deep learning -- Introduction to linear regression model
Hands on deep learning -- implementation of multi-layer perceptron from scratch and its concise implementation
Strvec class mobile copy
(P27-P32)可调用对象、可调用对象包装器、可调用对象绑定器
Hands on deep learning -- image classification dataset fashion MNIST
Learning notes (1): live broadcast by Dr. Lu Qi - face up to challenges and grasp entrepreneurial innovation opportunities - face up to challenges and grasp entrepreneurial innovation opportunities -1
【新规划】
Discrete chapter I
Principle and configuration of MPLS
FPGA to flip video up and down (SRAM is61wv102416bll)
电气火灾探测器对各用电回路进行实时监控
visual studio2019的asp.net项目添加日志功能
Beidou satellite navigation system foundation part 1