小编Chr*_*ian的帖子

IPTables如何nat 10.8.ab到10.0.ab?

问题 - 将 10.8.ab 转换为 10.0.ab ?

我有一个堡垒主机的 VPN 设置。我正在尝试映射,10.8.0.0/17以便10.0.0.0/17将 IP 地址10.8.1.1映射到10.0.1.1我的本地网络中。

我想这个问题的罪魁祸首是

iptables -t nat -A PREROUTING -d 10.8.0.0/17 -j DNAT --to-destination 10.0.0.0-10.0.127.255
                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
####
# This allows you to DNAT connections in a round-robin way over a given range of destination addresses.
# --to-destination ipaddr-ipaddr
#     Address range to round-robin over. 
Run Code Online (Sandbox Code Playgroud)
# What I Want:
#    10.8.0.1 -> 10.0.0.253 -> 10.0.0.1
# What I Get:
listening on tun0, link-type RAW …
Run Code Online (Sandbox Code Playgroud)

networking linux vpn iptables

3
推荐指数
1
解决办法
1504
查看次数

标签 统计

iptables ×1

linux ×1

networking ×1

vpn ×1