(E-Mail Removed) wrote:
>
> # FWD: Allow all connections OUT and only existing and related ones IN
> iptables -A FORWARD -i $eth0 -o $ppp0 -m state --state
> ESTABLISHED,RELATED
> -j ACCEPT
> iptables -A FORWARD -i $eth0 -o $ppp0 -j ACCEPT
I think you've got the interfaces backwards in the first line, but
that's probably a typo, since the configuration works.
> # Enabling SNAT (MASQUERADE) functionality on $EXTIF
> iptables -t nat -A POSTROUTING -o $ppp0 -j MASQUERADE
>
> However in this way all the traffic of PC2 is directly send to ppp0
> which is the pptp tunnel. This is generally fine and it's working but
> our ISP has a local free server which can't be accessed from PC2
> because the request is sent through the tunnel. And it shouldn't be
> because the free local server is on the LAN the other NIC of PC1 is
> connected to (the NIC connected to the ISP).
PC2 sends packets to their destination based on the routing table, not
the iptables setup. What's the ouotput from "route -n" when the ppp link
is up?
Make sure you have an entry for this local server in your routing table,
and it wouldn't hurt if the entry had a lower metric than the default
route through ppp0. Also, make sure that packets exiting eth0 on their
way to this server aren't blocked by firewall rules.