Jump to content
Not connected, Your IP: 3.15.211.41
BigEd

ANSWERED How do I set my VPN to bypass VPN when sending mail

Recommended Posts

ok, using Ubuntu 14.04, Thunderbird, VPN through Network manager. Unable to connect to my outgoing mail server.

smtp.secureserver.net / 68.178.213.37 port 465 SSL/TLS . I am unable to connect to it while on VPN (Blocked I assume), turn off VPN and I have no problem. This also seems to be the only port they offer.

Is there a way to add to the settings that anything going to this address to bypass VPN via the iptables and if so how. Tried a few settings and still doesnt work. Or do I need to add a additional Netcard?

Share this post


Link to post

First of all, I'd file a complaint with whoever you're with - why would any service block a customer's IP on an authenticated mailserver? Makes little sense to me.

 

Anyway, if you do want to bypass the VPN for this IP, you need to set a route for it. Routes are not handled by iptables.

In NetworkManager, edit your VPN connection. In the IPv4 tab, you will find a "Routes" section.

Add a route for:

Address 68.178.213.37

Netmask 255.255.255.255

Gateway X.X.X.X

 

Replace X.X.X.X with your home router's local address (192.168.0.1, for example)

 

You only need to touch iptables if you're already using it to block non-VPN traffic.

In that case, create a rule that allows outgoing traffic to 68.178.213.37 on your ethernet or wifi interface.


all of my content is released under CC-BY-SA 2.0

Share this post


Link to post

I would file a complaint, But my smtp server is GoDaddy and that would be like pulling teeth. I would prefer not to use them but for reasons I have to because of my email settings and certain things I need to do. So someone at one time (one we need to thank with a hammer or such) used the VPN server to flood out spam mail and got the server banned creating my problem.

 

Before trying what you said I switch to a US server in PA, my god I could of walked the 2400 miles faster than sending a file. But at least the smtp worked. So that leaves it with the IP being blocked on the 1st server for sure. I then tried your settings as you mentioned and almost nothing worked, web pages died, even doing a netstat -r was dead slow at displaying. Here are some of the settings before and after (each labelled below)... The `p3plibsmtp02-v0` is the smtp server. Well after this I changed to another server in CA, `Chort` with out adding the routing and low and behold the smtp worked.

 

By the way, I'm using Charter with 60mbps download speed, so finding a good VPN server is a trick to get close to what is acceptable for speeds.

 

====VPN RUNNING With the Routing Added====
Kernel IP routing table
Destination                 Gateway         Genmask         Flags MSS Window  irtt Iface
default                         10.30.0.1       0.0.0.0 UG        0 0        0 tun0
10.30.0.0           *               255.255.0.0     U         0 0    0 tun0
p3plibsmtp02-v0 192.168.0.2     255.255.255.255 UGH       0 0          0 tun0
184.75.214.162  192.168.0.2     255.255.255.255 UGH       0 0          0 eth1
192.168.0.0     *               255.255.255.0   U         0 0          0 eth1
192.168.0.2     *               255.255.255.255 UH        0 0          0 tun0
192.168.193.0   *               255.255.255.0   U         0 0          0 vmnet8
192.168.200.0   *               255.255.255.0   U         0 0          0 vmnet1

estrait@sunblazer:~$ ping smtpout.secureserver.net
ping: unknown host smtpout.secureserver.net (does use a range of IP's)

==== No VPN Running =====
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window irtt Iface
default         192.168.0.2     0.0.0.0         UG        0 0          0 eth1
192.168.0.0     *               255.255.255.0   U         0 0          0 eth1
192.168.193.0   *               255.255.255.0   U         0 0          0 vmnet8
192.168.200.0   *               255.255.255.0   U         0 0          0 vmnet1

====VPN without the Routing added====
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window irtt Iface
default         10.30.0.1       0.0.0.0         UG        0 0          0 tun0
10.30.0.0       *               255.255.0.0     U         0 0          0 tun0
184.75.214.162  192.168.0.2     255.255.255.255 UGH       0 0          0 eth1
192.168.0.0     *               255.255.255.0   U         0 0          0 eth1
192.168.193.0   *               255.255.255.0   U         0 0          0 vmnet8
192.168.200.0   *               255.255.255.0   U         0 0          0 vmnet1

PING smtpout.where.secureserver.net (68.178.252.229) 56(84) bytes of data.
64 bytes from p3plsmtpa12-v01.prod.phx3.secureserver.net (68.178.252.229): icmp_seq=1 ttl=117 time=163 ms

Share this post


Link to post

I wrote a script to do this for multiple websites for use with Network Manager's dispatcher service. See https://www.mankier.com/8/NetworkManager

 

#!/bin/bash
URL_LIST=("smtp.secureserver.net" "anothersite.com" "space-delimited.net")
GATEWAY="192.168.0.1"
 
IP_LIST=()
 
for url in $URL_LIST
  do
    ip=`dig +short $url`
    IP_LIST+=("$ip")
  done
  
for ips in $IP_LIST
  do
    ips=(`echo $ips | tr " " "\n"`)
    for ip in $ips
      do
        ip route add $ip via $gateway
      done
  done

Add in the URLs you need, save it as root in /etc/NetworkManager/dispatcher.d as whatever you want to call it and it will run after connecting to a network.

Share this post


Link to post

So how can I make press switches behave like toggle ones ?

 

e.g Landing gear has also a toggle functionality Key binding but not EAC for example. Is there any way to create one for EAC etc ?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...