forwarding traffic on iptables redhat 6
Hello
I have redhat 6.7 with iptables 1.4.7 Here are the two rules I want to make: 1-forward all incoming traffic by eht0 to eth1 (all protocols) 2-forward all incoming traffic by eth1 to another ip server (all protocols) Here are the two rules I have defined: 1-iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT 2-iptables -t nat -A PREROUTING -p tcp -d x.x.x.x -j DNAT --to y.y.y.y (x.x.x.x is the ip of eth1) Only the first pass,and when I put “iptables –S”, it is visible, the other not The second disappears once the server rebooted. I checked all these elements 1-CONFIG_IP_NF_TARGET_REDIRECT=m 2-CONFIG_NETFILTER_XT_MATCH_STATE=m 3-net.ipv4.ip_forward = 1 Could you help me Thanks in advance |
[QUOTE=bsystem;5620469]
Here are the two rules I want to make: 1-forward all incoming traffic by eht0 to eth1 (all protocols) 2-forward all incoming traffic by eth1 to another ip server (all protocols) [quote] If you are forwarding everything regardless of port or protocol then all you need is: Code:
iptables -A FORWARD -j ACCEPT Quote:
Quote:
Quote:
|
All times are GMT -5. The time now is 01:35 AM. |