novaebai 发表于 2012-12-03 13:06

iptables域名端口转发

环境如下:
PC一台          192.168.100.10 网关192.168.100.1(无法直接访问公网)
linux server   192.168.100.100
实现目的:
linux配置iptables实现PC通过改写hosts文件上网访问gateway.push.apple.com的2195端口和feedback.push.apple.com的2196端口
由于apple.com IP地址较多,可否通过iptables实现动态域名转发

PChosts配置如下:


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

127.0.0.1       test.lab.mobileiron.cn test
192.168.100.100    gateway.push.apple.com
192.168.100.100    feedback.push.apple.com

chenyx 发表于 2012-12-04 08:05

没听说iptables有这个功能,你不是已经写过hosts了吗,直接用域名访问就好了
页: [1]
查看完整版本: iptables域名端口转发