Thursday, March 27, 2008

IPtables For Outlook Express Mails

A Squid proxy can share a Internet Service. But it will not download the mails in Outlook Express.
In this case IPtables can be used to retrieve mails.

A model Network setup:

Eth0 : Public N/W

Eth1 : Private N/W
IP Range : 192.168.10.0/24

So hence the Iptables rules for forwarding the packets ,

# iptables --table nat --append POSTROUTING -s 192.168.10.0/24 --out-interface eth1 -j MASQUERADE

# iptables --append FORWARD -s 192.168.10.0/24 --in-interface eth0 -j ACCEPT

# iptables -A INPUT -s 192.168.10.0/24 -j ACCEPT

Insert the above rules,
Save and restart the service

#service iptables save
# service iptables restart
Now you can download your mails in the Outlook express.

Client Side Configuration:
1. Set the Gateway address as Eth1 IP.
2. Open Outlook Express – Tools – Accounts – mail – add new
3. Configure your mail account.