当前位置:网站首页>Iptables implementation under the network limited (NTP) synchronization time custom port
Iptables implementation under the network limited (NTP) synchronization time custom port
2022-08-05 07:59:00 【Wangzai_Milk】
# requirementsntpdate 192.168.1.1:123(192.168.1.1:666->10.0.0.1->123)ntpdaete cannot specify the port, the ntpd synchronization is 192.168.1.1:123, but because 123 cannot be accessed normally, the machine has mapped port 666 to port 123 of the back-end ntp server# Solution (time synchronization server, client configuration is as follows), because REDIRECT will access the local machine or access the port in the packet header of the host with this machine as the gateway machine from the original targetThe port is replaced with the specified target port, which does not apply in this case, only the local port is forwarded to another port on the local machine# Since this is the local traffic forwarding configuration, it does not belong to other traffic forwarded to the local machine, so configuring PREROUTING DNAT has no effect, because it will not match the rules here at all# Method 1, POSTROUTING cannot configure DNATiptables -t nat -I OUTPUT -p udp -d 192.168.1.1 --dport 123 -j DNAT --to 192.168.1.1:666# Verification (because there is no actual NTP server in the backend, it will not pass here, we only need to look at the iptables rules)[[email protected] ~]# ntpdate 192.168.1.13 Aug 11:01:34 ntpdate[1734]: no server suitable for synchronization found# iptables rule verification, through pkts, bytes here, it can be seen that the rule takes effect, and the native ntpdate 192.168.1.1:123 -> ntpdate 192.168.1.1:6666 -> (this layer of network equipment is implemented)mapping) ntpdate 10.0.0.1:123[[email protected] ~]# iptables -t nat -nvLspan>Chain OUTPUT (policy ACCEPT 15 packets, 976 bytes)pkts bytes target prot opt in out source destination1 76 DNAT udp -- * * 0.0.0.0/0 192.168.1.1 udp dpt:123 to:192.168.1.1:666 边栏推荐
猜你喜欢

VXE-Table融合多语言
![[Structural Internal Power Cultivation] The Mystery of Enumeration and Union (3)](/img/39/d20f45ccc86ebc4e5aebc8e4d0115f.png)
[Structural Internal Power Cultivation] The Mystery of Enumeration and Union (3)

3555. 二叉树

In the anaconda Promat interface, import torch is passed, and the error is reported in the jupyter notebook (only provide ideas and understanding!)

本地能ping通虚拟机,虚拟机ping不通本地

【结构体内功修炼】枚举和联合的奥秘(三)

Use of thread pool (combined with Future/Callable)

Discourse 清理存储空间的方法

链表专项之环形链表

餐饮大单品「真香」,却没有穿透周期的能力
随机推荐
Embedded Systems: Basic Timers
iptables实现网络限制下ntp自定义端口同步时间
线程池的创建及参数设置详解
busybox 知:构建
Hash these knowledge you should also know
【 LeetCode 】 235. A binary search tree in recent common ancestor
外企Office常用英语
Long-term recruitment embedded development-Shenzhen Baoan
网络安全研究发现,P2E项目遭遇黑客攻击只是时间问题
小本创业者的致胜法宝!
程序设计中的感悟
软件系统测试和验收测试有什么联系与区别?专业软件测试方案推荐
SQL SERVER关于主从表触发器设计
Liunx教程超详细(完整)
二叉树进阶复习1
Game Thinking 19: Multi-dimensional calculation related to games: point product, cross product, point-line-surface distance calculation
彩绘漂亮MM集
YOLOv3 SPP理论详解(包括CIoU及Focal loss)
Chapter3、色调映射
长期招聘嵌入式开发-深圳宝安