Hya, I'm trying to coerce iptables into achieving the following goals:
Router 'A' should perform NAT on all outgoing packets
Router 'A' should forward all CVS connections to it to the CVS server 'B', both from an internal host 'C', as well as an external host, 'D'.
My current relevant iptables rules are:
Code:
-A PREROUTING -p tcp -m tcp --dport 2401 -j DNAT --to-destination 192.168.69.244:2401
-A POSTROUTING -o ppp0 -j MASQUERADE
-A POSTROUTING -d 192.168.69.0/255.255.255.0 -p tcp -m tcp --dport 2401 -j MASQUERADE
The problem with these is that when computer 'C' tries to access external CVS servers, it can't. If I remove the prerouting rule it can just fine, but then of course theres no port forwarding.
I have a sinking suspicion that whats happening is that all incoming CVS traffic is getting routed to my CVS server irrespective of its intended destination as I can connect to these servers fine, but I'm unable to be more specifc as to the destination in the rule as I'm on a DSL provider that only offers dynamic IPs.
Suggestions would be appreciated.