<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Peter Peltonen wrote:
<blockquote
 cite="mid:69b6a1580908301147la470670m844376f0fde6f66f@mail.gmail.com"
 type="cite">
  <pre wrap="">I have a fresh installed CentOS 5.3 server which should route traffic
between two networks like this:

network A (Internet) -- eth0 (default gw) : server : eth1 -- network B (LAN)

I have set in sysctl.conf

net.ipv4.ip_forward = 1

and routing works fine like this. But when I switch on the iptables
service (with default setup, configured when installing the server),
routing stops working (or at least I cannot ping a server in network A
from network B).  I guess the firewall is stopping it, so I read

<a class="moz-txt-link-freetext" href="http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s1-firewall-ipt-fwd.html">http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s1-firewall-ipt-fwd.html</a>

and issued the commands

# iptables -A FORWARD -i eth1 -j ACCEPT
# iptables -A FORWARD -o eth1 -j ACCEPT

but that did not help.

So I am asking: what is the correct iptables command to make forwarding work?

Regards,
Peter
_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>

  </pre>
</blockquote>
my iptables like that:<br>
<ul>
  <li>iptables –table nat –append POSTROUTING –out-interface eth0 -j
MASQUERADE</li>
  <li>iptables –append FORWARD –in-interface eth1 -j ACCEPT</li>
</ul>
Regards<br>
<br>
Firdaus<br>
i'm come from indonesia. :)<br>
<br>
</body>
</html>