Question: Is it possible to create an VPN connection while using site-to-site VPN?

Have you ever tried or done this?

What are possible problems, pitfalls, things of the impossible, etc. ?

Also see: [Is it possible to use Microsoft's "Secure Connection Rules" (IPSec) with VPN?](https://serverfault.com/questions/126537/is-it-possible-to-use-microsofts-secure-connection-rules-ipsec-with-vpn)

Answer: 
The solution of @muirbot works really well for me. I made some little improvements to that. I'll add it below his post once I have enough reputation.

Replace the line 
```
ip=echo $1 | cut -d"@" -f2
```
 with 
```
ip=echo $@ | grep -Eio [[:alnum:]_.-]+@[[:alnum:]_.-]+ | cut -d@ -f2
```

This change allows for giving additional arguments to your ssh command like "ssh -p 1111 userName@host"

The regular expression allows for simple ipv4 addresses and domain names.

To further support multiple arguments change the last line into 
```
/usr/bin/ssh $@
```

**Update 2021-03-03:**

When you are having domains like example.com and [www.example.com](http://www.example.com) with different colors, then the script will not work as expected.

Make sure you place the shortest URL on top and then change 
```
color=cat ~/.server_colors | grep $ip | cut -f2 -d","
```
 to 
```
color=cat ~/.server_colors | grep -m 1 $ip | cut -f2 -d","
```

The **grep -m 1** command will stop when it finds the first match.
I use a script that launches SSH in xterm windows with different bg/fg colors. It selects the colors based on the hostname's hash from a color span so that no configuration is needed. 

The script is written in Ruby: <https://github.com/mickeyil/ssx>