Tuesday 6 February 2018

wireless networking - is it possible to link different email accounts to different network profiles?


My work firewall for wired internet blocks almost every port except http, https and maybe a few other web-related ports (993, 465 and everything else to do with IMAP is blocked). Impenetrable for, among others, Gmail. My office mail is via Exchange/MAPI (the mail server is also a web server? strange) and is not stopped by the firewall.


I also have wireless work WIFI account, which of course is slower than the wired connection, but is not blocked by any firewall.


When the wired internet is connected, a simultaneous check of my email accounts gives a message for Gmail: "could not connect to mail server #.#.####@#####.###; the connection was refused." I understand why.


The funny thing is that if I disable the wired internet, the simultaneous check for both my e-mail accounts completes successfully! This would not be necessary if checking Gmail would use the (still available) wireless connection!


Would it somehow be possible to couple the gmail account to the wireless internet connection and the other internet traffic to the wired internet connection? Then it would be possible to keep reading Gmail in an e-mail program (e.g. Thunderbird) instead of having to use WebMail.



Answer



I used to have a similar issue at my old place of work. I never found an ideal solution to it, but you can set up custom routes to make sure that gmail packets are passed via the wireless network. This is a bit complicated, but it does work! If there is a simpler method I would definitely like to know about it!


Basically, you need to ping imap.googlemail.com to determine the GMail IMAP server IP address:


C:\>ping imap.googlemail.com

Pinging googlemail-imap.l.google.com [173.194.71.16] with 32 bytes of data:
Reply from 173.194.71.16: bytes=32 time=43ms TTL=41
Reply from 173.194.71.16: bytes=32 time=43ms TTL=41
Reply from 173.194.71.16: bytes=32 time=43ms TTL=41
Reply from 173.194.71.16: bytes=32 time=43ms TTL=41

Ping statistics for 173.194.71.16:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 43ms, Maximum = 43ms, Average = 43ms

You now need to create a route for this in your routing table based on your wireless network default gateway (you can find this by running ipconfig /all or in the network adapter details).


Say your wireless network default gateway is 192.188.1.254, type the following in a command prompt (which must be 'Run as administrator'):


C:\>route ADD -p 173.194.71.16 MASK 255.255.255.255 192.168.1.254 METRIC 1

This will force all traffic to the IMAP server to pass through the wireless network.


You can test the configuration by running tracert imap.googlemail.com and you should see it go through the wireless gateway.


This works fairly well in the short term, but the googlemail DNS entry is constantly changed so you will need to re-run the ping and route ADD steps a few times when it stops working but this will lessen over time. The -p switch on the route ADD makes it a persistent route which remains after reboot.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...