Tim wrote:
> 
> I have a 192.168.100.0 network with my iptables box sitting at
> 192.168.100.12 and a mailserver at 192.168.100.10 and also with a public ip
> and name.
> 
> I have several users who are both on the road and work in the office
> commonly.
> 
> I want to make a rule for them so that when they request mail.cimx.com it
> redirects to 192.168.100.10.
> 
> I tried to make the following rule:
> iptables -t nat -A PREROUTING -p tcp -d $MAIL_IP -j REDIRECT 192.168.100.10
> but it seems to not work.


You'll have to use DNAT for that:

iptables -t nat -A PREROUTING -p tcp -d $MAIL_IP \
        -j DNAT --to-dest 192.168.100.10

HTH

- Karl

Reply via email to