Page 1 of 2

Mac OS X Internet Sharing

Posted: Sat Jul 04, 2009 9:29 am
by panosru
Hello, I'm trying Viscosity to connect to a VPN server because I couldn't connect to the VPN through the building Mac OS X VPN network interfaces.

Well I successfully connected to the VPN but my problem is that I have setup Internet Sharing into my Mac OS X that is share my connection from Ethernet to Airport so actually I share my Ethernet connection through my Airport (WiFi).

My girlfriend's laptop runs Windows Vista she can connect with me through WiFi and we can share files but she cannot connect to internet as long as I'm connected to VPN through Viscosity.

thanks in advance :)

Re: Mac OS X Internet Sharing

Posted: Sun Jul 05, 2009 11:45 am
by James
Hi panosru,

It sounds like that once you are connected to your VPN, the VPN network interface becomes the default interface for network traffic (i.e. all Internet traffic flows through the VPN instead of directly through your Ethernet connection). However Internet Sharing is only able to share the Ethernet interface, not the VPN interface.

Unfortunately there is no simple solution for this. I'd recommend trying either of the following:

1. Manually setup NAT (the technology behind Internet Sharing) on the Mac so the VPN interface is shared. This requires some technical knowledge, however there are quite a few tools available that should help you do this:

http://www.hanynet.com/waterroof/
http://personalpages.tds.net/~brian_hil ... tress.html
http://www.sunprotectingfactory.com/ind ... 2&Itemid=9

2. Use the Windows laptop to share the Internet connection instead. That way you can connect to your VPN without needing to worry about it affecting the sharing.

Regards,
James

Re: Mac OS X Internet Sharing

Posted: Sun Jul 05, 2009 9:37 pm
by panosru
Hello James,

Thank you for your reply,

I downloaded Waterroof but didn't figure out a lot of things..

About the #2 recomendation well yes I tryied it but I really need to share internet connection from Mac to Windows..

Why the systems recognizes Viscosity as default network interface?

Re: Mac OS X Internet Sharing

Posted: Mon Jul 06, 2009 6:04 pm
by James
Why the systems recognizes Viscosity as default network interface?
Well it is only a hypothesis, so it may not be the case. However the VPN interface can become the default route for traffic if the "Send all traffic over VPN connection" is checked (under the Networking tab when editing your connection), or if your VPN server is automatically setting this option for you (almost all commercial VPN providers will enable this option).

Cheers,
James

Re: Mac OS X Internet Sharing

Posted: Tue Jun 21, 2011 2:10 pm
by themesser
hi james, can you tell how you accomplished that using waterroof ?
i can see my connection to the vpn server in the connection list, but don't know at all what to do in the "NAT setup" but when i click "start NAT" an error pops up. Is there something to configure ?
thanks

Re: Mac OS X Internet Sharing

Posted: Wed Jun 22, 2011 1:35 pm
by James
Hi themesser,

You'll need to enter the VPN connection's interface (e.g. tun0, tap0, etc) into the "NAT Interface (WAN)" field before clicking the "Start NAT" button.

Cheers,
James

Re: Mac OS X Internet Sharing

Posted: Sat Jan 07, 2012 7:24 pm
by edgarchinchilla
Hi James, im using this post as a guideline to resolve my own issue but i dont know where to take the "VPN connection's interface (e.g. tun0, tap0, etc) " to enter it, please help. Thank you.

Re: Mac OS X Internet Sharing

Posted: Sat Jan 07, 2012 8:00 pm
by edgarchinchilla
I entered ovpn### in that field (WAN) and it gives me this error: Cant start NAT daemon, sorry. natd: cannot open config file / etc/nat.conf: No such file or directory. Please verify your settings.

Re: Mac OS X Internet Sharing

Posted: Sun Jan 08, 2012 5:26 am
by James
Hi edgarchinchilla,

You'll need to view the list of network interfaces while your VPN connection is connected, and pick out the appropriate one. OpenVPN network interfaces start with either "tap" or "tun" depending on how it is configured. So you're looking for something like "tap0", or "tap1", or "tun0", or "tun1" etc.

Cheers,
James

Re: Mac OS X Internet Sharing

Posted: Thu Jan 19, 2012 9:52 am
by Bullitt
Hi, I have viscosity set up on my mac mini (connected via ethernet), and would like to set up a separate wireless network that routes all traffic through the VPN. It seems that I am trying to do what the OP is trying to get rid of. I have set up internet sharing, but am not able to access the VPN connection (but I am able to connect to the mac mini).

So the setup I am looking for is something like:

DSL modem -(ethernet)> Time Capsule -(ethernet)> Mac Mini -(wifi)> multiple devices (PS3, android phone, etc).

I note that a suggested fix was to manually setup NAT on the Mac so the VPN interface is shared. I have poked around WaterRoof, and have not been able to figure out how to get this done (I'm a networking novice). Does anyone know of a step by step guide for setting something like this up?

B