linux如何关闭udp端口,如何阻止linux RHEL7中的udp端口范围(How to block udp ports range in linux RHEL7)...

如何阻止linux RHEL7中的udp端口范围(How to block udp ports range in linux RHEL7)

需要测试使用UDP端口范围从5000到60,000英寸的应用程序。我想测试端口的边界值条件。 所以我想阻止UDP端口范围从5000到59999。

need to test an application which uses the UDP port range from 5000 to 60,000 in. i want to test the boundary value condition for ports. so i want to block UDP ports range from 5000 to 59999.

原文:https://stackoverflow.com/questions/39200461

更新时间:2020-01-17 05:58

最满意答案

使用iptables:

iptables -A INPUT -p udp --dport 5000:59999 -j DROP

或更好,

iptables -A INPUT -p udp --dport 5000:59999 -j REJECT --reject-with icmp-port-unreachable

Using iptables:

iptables -A INPUT -p udp --dport 5000:59999 -j DROP

or, better,

iptables -A INPUT -p udp --dport 5000:59999 -j REJECT --reject-with icmp-port-unreachable

2016-08-29

相关问答

问题完全在别处。 Apache工作得很好。 错误发生在Magento的index.php文件之后,我的PHP设置似乎存在某种类型的问题。 一旦我从/ var / www / html目录中请求另一个文件,Apache就像它应该的那样服务它。 我犯这样一个基本错误是不好的。 The problem was entirely elsewhere. Apache was working just fine. The error was somewhere after Magento's index.ph

...

我相信你遇到了与这个线程相同的问题: 奇怪的Python编译结果带有“--enable-shared”标志 。 要修复它,您需要使用: LD_RUN_PATH=/usr/local/lib make && sudo make altinstall

(这样生成的二进制文件会查找正确的共享Python库。) 作为旁注,我认为当您需要在一个系统上使用不同的Python版本时,Red Hat Software Collections会更好。 查看关于RHSCL 。 I believe you're ru

...

最常见的方法是使用带有以下标志的netstat控制台实用程序: netstat -plan

哪里: -p : Show the PID and name of the program to which each socket belongs;

-l : Show only listening sockets;

-a : Show both listening and non-listening sockets;

-n : Show numerical addresses instead of t

...

首先安装来自EPEL存储库的python-pip( https://fedoraproject.org/wiki/EPEL-它与所有Red Hat企业Linux发行版兼容 - 无论是CentOS,RHEL,Oracl,ScientificLinux还是其他),(或者, t信任EPEL回购提供商,您可以使用get-pip.py( https://bootstrap.pypa.io/get-pip.py )脚本,但必须相信它的提供商),然后通过安装 pip install ipython

Insta

...

这是DHCP发现请求。 接口尝试从DHCP服务器获取IP地址。 This is a DHCP Discovery request. The interface is attempting to acquire an IP address from your DHCP server.

操作系统的IP路由器决定使用哪种接口。 通常你真的不想“从eth1中推出一些东西”,因为这将是OSI 1级操作。 你在3级工作,所以你最想要的是“把东西发送到这样的地方,这样通过eth1发送是最佳的”。 最简单的解决方案是定义一条静态路由,告知系统应该通过特定接口或具有特定IP的接口发送到特定位置的IP数据报。 这个AskUbuntu问题涵盖了这两个选项。 It's up to OS's IP router to decide what interface to use. Usually you

...

使用iptables: iptables -A INPUT -p udp --dport 5000:59999 -j DROP

或更好, iptables -A INPUT -p udp --dport 5000:59999 -j REJECT --reject-with icmp-port-unreachable

Using iptables: iptables -A INPUT -p udp --dport 5000:59999 -j DROP

or, better, iptables

...

UDP通常不会阻止。 如果接收器具有完整缓冲区,则数据包将被静默丢弃。 这是设计的。 如果您想要可靠的传输和阻塞语义,请改用TCP。 注释: TCP阻塞的原因是因为发送方获得了它发送的每个数据包的确认。 发件人只允许一定数量的“传输中”没有确认的数据,并在达到此阈值时阻止。 由于UDP不发送接收数据包的确认,因此发送方无法知道何时阻止。 当然,它可能会决定阻止它是否使其以太网端口饱和,但是使用UDP时无法判断您的上行链路是否已饱和,接收器是否已挂起,或者gremlins是否正在使用您的数据包。 不

...

“我所知道的是,在关闭+ UseG1GC之后问题就完全消失了。” 根据: https://www.eclipse.org/forums/index.php/t/1082145/ 在我将eclipse更新为氧气版本后,我遇到了同样的问题。 "What I know is that the problem completely disappears after turning off +UseG1GC ." according to: https://www.eclipse.org/forums/in

...

根据RHEL文档,这里: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Package_Manifest/chap-Base-Server-Variant.html RHEL 7的服务器变体将tomcat-webapps(安装tomcat根页面)和tomcat-admin-webapps(安装Web应用程序管理器和虚拟主机管理器)列为核心软件包。 我会特意检查这些包裹。 According

...

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值