LAN email fails while connected to a modem

Broo

Well-Known Member
Joined
Dec 8, 2004
Messages
426
Hi all

I have a K3565 3G modem for browsing the internet. The problem I have is that the company I work for has an email server connected via the LAN, and while I am connected to the internet with the modem, I am unable to check my email on the LAN, even though the primary connection has been set to the LAN. Outlook eventually times out with an error. As soon as I disconnect the modem, the email service is restored.

What's up?
 

gregmcc

Honorary Master
Joined
Jun 29, 2006
Messages
25,514
While connected to 3G your default gateway will be changed to the ISP. So trying to access a internal server will probably try to route it out via the internet. Also a lot of these 3G apps drop the LAN connection when you connect up for security.

You've dialed up to the internet effectively terminating a internet connection on your laptop while its connect to the LAN - bypassing all the firewalls and thousands of rands the companies spend trying to protect themselves. Your security guy will most likely shoot you if he discovers it.

For the company I work for if you had to do that you would be shown the door.
 

Random717

Expert Member
Joined
May 30, 2006
Messages
2,121
Disconnect your 3g. Open a command prompt and type in 'ipconfig'. Find 'ethernet adapter local area connection' and look at your ip address. You'll use these values in a script that will send specific traffic through your network card instead of your 3g modem.

Here are example values:
IPv4 Address: 193.168.35.49
Subnet Mask: 255.255.255.0
Gateway: 193.168.35.1

Now you have a choice, you can enable this just for your mail server, or for all the address on your LAN.

If you just want to do your mail server, find it's IP address (ping the name in your account properties in your mail client).
Mail server example: 193.168.47.10

Next open notepad and type in the following line:
route ADD 193.168.47.10 MASK 255.255.255.255 193.168.35.49

The first value (193.168.47.10) is your mail server IP address, the last value is your IP address.
If you have different incoming and outgoing mail servers, do this for both of them.

Save the file with the extension .cmd and run it when you have connected your 3g modem.

Access to your whole network is tricky, as it depends on the scope of the network. If your IP address starts with 10. or 172.16-31. or 192.168. then use the following respective line (replacing the last value with your IP address):
route ADD 10.0.0.0 MASK 255.0.0.0 10.5.5.46
route ADD 172.16.0.0 MASK 255.240.0.0 172.16.34.98
route ADD 192.168.0.0 MASK 255.255.0.0 192.168.10.27

If your IP starts with something different altogether, then you can take a few guesses till it works:
route ADD 193.168.0.0 MASK 255.255.0.0 193.168.35.49
If the mail server is on the same subnet (third octet):
route ADD 193.168.35.0 MASK 255.255.255.0 193.168.35.49

Create another file to delete the route in case it messes with other things.
route DELETE 193.168.35.0
This value is simply the one used for ADD in the first file.

If you manage to fubar everything, restarting your computer will reset all the values.
One thing to note is that your IP might change, so you'll have to update the script whenever this happens. If you're using Vista or 7, with UAC enabled, you'll need to run the script as administrator.
 
Top