On Thu, 8 Jan 2004, Erez Doron wrote:

> hi
>
> i am working from both home and work,
> i need different configurations for both -
> different proxy, different smtp server and some other stuff as well
> i am using both windows and linux. and have cygwin installed.
>
> i thought of a way to run a script when i get an ip, and the script will
> configure all i need.
>
> so i am looking for a way to configure the outgoing mail server (mozilla
> mail - both linux and windows) from a script ( e.g. comman line)
> also configuring proxy for mozilla (linux/windows) and IE from script.
>

  In a similar situation (I have a home network which can be connected to
several providers), I used iptables to reroute requests to the correct
servers by assigning private IPs for the mail and proxy servers.

  For example, use 192.168.0.1 for mail and 192.168.0.2 for proxy and then
do:

iptables -t nat -A PREROUTING -d 192.168.0.1 -j DNAT \
         --to-destination your.mail.server
iptables -t nat -A PREROUTING -d 192.168.0.2 -j DNAT \
         --to-destination your.proxy.server

A plus is this can work on a network router for the entire net.

  Alon

-- 
This message was sent by Alon Altman ([EMAIL PROTECTED]) ICQ:1366540
GPG public key at http://alon.wox.org/pubkey.txt
Key fingerprint = A670 6C81 19D3 3773 3627  DE14 B44A 50A3 FE06 7F24
--------------------------------------------------------------------------
 -=[ Random Fortune ]=-
The answer to the question of Life, the Universe, and Everything is...

        Four day work week,
        Two ply toilet paper!

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to