AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-359667

SoabTI's questions

Martin Hope
SoabTI
Asked: 2016-11-29 08:53:12 +0800 CST

如何阻止来自多个 dns 的目标 ip 拒绝使用 iptables 回复

  • 0

如何阻止 iptables 从绑定发送到同一 IP 地址的拒绝数据包序列?

我考虑过使用字符串扩展名来寻找“拒绝”。这会保护 dns 免受 DoS 攻击吗?

我的尝试:

iptables -A INPUT -p udp -m udp --sport 53 -m string --string "Refused" --algo bm -m recent --set --name block-dns --rsource
iptables -A INPUT -p udp -m udp --sport 53 -m string --string "Refused" --algo bm -m recent --rcheck --seconds 10 --hitcount 1 --name block-dns --rsource -j DROP
domain-name-system iptables
  • 3 个回答
  • 513 Views
Martin Hope
SoabTI
Asked: 2016-08-26 17:43:44 +0800 CST

iptables 规则仅将 dns 列入白名单并删除其他所有内容

  • 0

我正在尝试将 iptables 配置为dns 服务器的DROP默认策略INPUT,但出现了问题。OUTPUT

这是我的 iptables 脚本

iptables -P INPUT DROP 
iptables -I INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 53 -j ACCEPT

iptables -P OUTPUT DROP
iptables -I OUTPUT -o lo -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 53 -j ACCEPT
iptables -A OUTPUT -o eth0 -p udp --sport 53 -j ACCEPT

有一些数据包丢失,因为依赖此服务 dns 的计算机仅在清理 iptables 时才能导航。我哪里错了?

domain-name-system iptables
  • 1 个回答
  • 972 Views
Martin Hope
SoabTI
Asked: 2016-06-10 06:06:57 +0800 CST

IPTables 策略 INPUT DROP 但接受连接

  • 0

我使用以下规则配置了 iptables:

iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -P INPUT DROP
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -i lo -j ACCEPT
iptables -A INPUT -m conntrack --ctstate ESTABLISHED, RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT

但 nmap 指责除了80, 22 and 53

root @ ns1: / # iptables -L
Chain INPUT (policy DROP)
target prot opt ​​source destination
ACCEPT all - anywhere anywhere
ACCEPT tcp - anywhere anywhere tcp dpt: ssh
ACCEPT tcp - anywhere anywhere tcp dpt: http
ACCEPT tcp - anywhere anywhere tcp dpt: https
ACCEPT all - anywhere anywhere ctstate RELATED, ESTABLISHED
ACCEPT tcp - anywhere anywhere tcp dpt: domain
ACCEPT udp - anywhere anywhere udp dpt: domain

Chain FORWARD (policy ACCEPT)
target prot opt ​​source destination

Chain OUTPUT (policy ACCEPT)
target prot opt ​​source destination
root @ ns1: / # nmap -vv 10.0.0.2
...
PORT STATE SERVICE
22 / tcp open ssh
53 / tcp open domain
80 / tcp open http
111 / tcp open rpcbind
139 / tcp open netbios-ssn
445 / tcp open microsoft-ds
...

可能会发生什么?我相信这些端口111 139 445不会出现

debian iptables nmap
  • 1 个回答
  • 760 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve