Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I use a VPN tunnel to connect to a remote network on Snow Leopard. I set it up with the system settings for VPN and it works fine. Unfortunately, the VPN tunnel is used for all connections. Some ports (like the one I use for IMAP) are not open in the remote network.

Can I use VPN for some applications (like Firefox and Terminal) and my regular connection for others? Is there a third party app to fine tune the VPN settings?

Cheers

share|improve this question
    
If it´s only about Firefox and Terminal, have you considered using SSH and a SSH-Proxy instead of VPN (if possible)? –  Asmus Apr 11 '11 at 20:17
    
I have considered that. For the sake of security, a direct SSH connection is not possible. –  Martin Preusse Apr 12 '11 at 10:25
    
How are you using the VPN connection? I mean if you only access certain hosts, then I might have a solution.. –  nuc Apr 12 '11 at 11:14
    
I use it for the Terminal (SSH), Firefox (I need it only to access scientific journals via my institutes network) and CyberDuck. I access many hosts, both local and remote. I'm curious, what would be your solution? –  Martin Preusse Apr 12 '11 at 12:32
    
@emempe in which way do you think a VPN connection will be more secure than a SSH one? SSH would cover your Terminal sessions, could create a Proxy for Firefox (FoxyProxy would make that super-easy) and CyberDuck can use SFTP. All this doesn´t require a VPN than re-routes all of your network traffic in my opinion. –  Asmus Apr 12 '11 at 22:07

2 Answers 2

up vote 2 down vote accepted

In general, the network settings are global, and apply to the whole machine, including all applications.

VPNs will work great to access machines on a known network (eg: 192.168.1.x = home, 10.1.1.x = work via VPN)

What kind of VPN is it? It's possible that the VPN has grabbed the default route, meaning that all network traffic that isn't on your local network will go via the VPN.

You can run netstat -nr in Terminal to see your routing table.

You can use sudo route change default 10.1.1.1 to change the default route to your local network's router (eg 10.1.1.1 for me) so that it will route external connections. Connections to your VPN network should still go through the VPN.

Hopefully this helps!

share|improve this answer

@Matt Connolly

Thanks for the idea, but I can't make much sense out of netstat -nr. The VPN is s Cisco IPsec VPN.

Without VPN the default is:

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.2.1        UGSc            5        0     en0

When I connect to the VPN it changes to:

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            utun0              UCS             5        0   utun0
default            192.168.2.1        UGScI           0        0     en0

So I have two defaults. I figure there's something about the Flags, but don't know how to change them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.