为了简化,假设我连续使用3个服务器(全部运行centos 6.4)
Internet---FW---LN---PN FW: firewall LN: login node PN: processing node
我可以从FW到世界ping,但不能从LN或PN。
我已启用IP FORWARDING并禁用LN中的IPTABLES:
[root@meta ~]# !1005 cat /proc/sys/net/ipv4/ip_forward 1 [root@meta ~]# !1014 iptables --list Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
所以我的问题是:如果我禁用iptables,IP转发工作? 或者我需要提高IPTABLES,并写出一个前瞻性的规则?
感谢-Ricardo
是的,在您的configuration中,假设您的networking路由正确,它应该正确转发。 如果您可以从LN中ping FW,但是从LN中ping不到Internet,则需要检查FW上的防火墙规则以及LN和FW上的路由规则。 validationLN是否具有公共IP地址,或者防火墙是否正确地将连接从互联网和NATing LN的传出通信转发回LN。
如果您正在使用专用地址空间(192.168 …,172 …,10 ….),则可能需要configurationNAT。 你只能用NetFilter又名iptables来做到这一点。
另一个解决scheme是使用应用程序代理并且不使用路由。