我想 匹配所有linux系統,
centos, ubuntu, 最好各版本都能用,
我主要用的是 centos 7. 但也有用 6的, 2個服務就不同, systemctl 和 service ,
如何 判斷 是iptables 還是 firewalld,
用哪個命令呢
# 總控
function firewall_port {
# 判斷是 iptables 還是 firewalld, 呼叫不同函式, 添加埠/服務
}
function firewalld_port {
#如果 判斷是 systemctl 還是 service, 來操作服務
}
function iptables_port {
# 有了 ipv6, 這個可以支持最好, 不支持也無所謂, 反正用的還不多
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/146646.html
標籤:專題技術討論區
上一篇:關于Linux網卡配置資訊
