[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:
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)
|
Not sure why you need the DNAT rule here could you explain this in more detail like what you are trying to accomplish?
Quote:
Only the first pass,and when I put “iptables –S”, it is visible, the other not
|
One is a nat filter rule and only shows up when you list the nat rules.
Quote:
The second disappears once the server rebooted.
|
That is because you need to save your rules before you reboot if you do not have that already setup in
iptables-config