小编Chi*_*aba的帖子

使用iptables阻止端口后如何列出所有打开的端口?

我使用这些命令来阻止所有端口并只允许某些特定端口。

iptables -F  
iptables -X  
iptables -P OUTPUT ACCEPT  
iptables -P FORWARD ACCEPT  
iptables -A INPUT -i lo -j ACCEPT  
iptables -A OUTPUT -o lo -j ACCEPT  
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT  
iptables -A OUTPUT -m conntrack --ctstate NEW,ESTABLISHED,RELATED -j ACCEPT  
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE    
iptables -A FORWARD -j ACCEPT    
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT  
/sbin/iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT    
/sbin/iptables -A INPUT …
Run Code Online (Sandbox Code Playgroud)

linux security iptables

6
推荐指数
1
解决办法
1万
查看次数

pacman:无法更新失败

我无法同步我的 archlinux。当我尝试使用pacman它时,得到这个:

ThinkPad-de-Micael_Andre% sudo pacman -Syu
[sudo] password for dmicaelandre:
Sorry, try again.
[sudo] password for dmicaelandre:
:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to update archlinuxfr (unable to lock database)
error: failed to update blackarch (unable to lock database)
error: failed to …
Run Code Online (Sandbox Code Playgroud)

pacman

0
推荐指数
1
解决办法
2350
查看次数

标签 统计

iptables ×1

linux ×1

pacman ×1

security ×1