Jump to content
Not connected, Your IP: 3.145.196.150
Sign in to follow this  
Storophanthus

Question about natd [Sharing my connection Tunnelblick- Macbook]

Recommended Posts

I have a Macbook with OS X Maverick 10.9.3 , I want to share my AirVPN connection to my android device.

 

I followed the instruction given here 

http://rodrigo.sharpcube.com/2010/06/20/using-and-sharing-a-vpn-connection-on-your-mac/

 

 

It says that I should not enable the "Internet Sharing" in System Preference.  Then how could my Android device connect to my macboook?

 

I did as instructed, and getting 

 

Flushed all rules.

00100 divert 8668 ip from any to any via tun0

00200 allow ip from any to any

net.inet.ip.forwarding: 0 -> 1

 

 

 

which should be fine. 

 

 

But my Airport is not becoming the gateway, and I can't find the SSID in my Android device.

 

 

 

Please Help.

Share this post


Link to post

Hello,

 

those instructions are quite outdated and are not fine for Mavericks, which should use pf as packet filtering tool, not ipfw.

 

First of all, be informed that OpenVPN clients are available in Android 4 or higher. https://airvpn.org/android

 

If you need to share the VPN connection on Mavericks please follow this Apple guide:

http://support.apple.com/kb/PH13855

 

keeping in mind that the interface you wish to share is tun0 (the network card used by OpenVPN), while the interface you wish to make accessible to the Android device is the WiFi card.

 

Kind regards

Share this post


Link to post

Hello,

 

those instructions are quite outdated and are not fine for Mavericks, which should use pf as packet filtering tool, not ipfw.

 

First of all, be informed that OpenVPN clients are available in Android 4 or higher. https://airvpn.org/android

 

If you need to share the VPN connection on Mavericks please follow this Apple guide:

http://support.apple.com/kb/PH13855

 

keeping in mind that the interface you wish to share is tun0 (the network card used by OpenVPN), while the interface you wish to make accessible to the Android device is the WiFi card.

 

Kind regards

 

Hi,  I actually want to use it for PS3, and using my Android as a test.

 

About that Apple guide, I can't seem to find "tun0"  in there, there are only: "Firewire", "Ethernet", "Bluetooth Pan", "Wifi".

 

is there a way to choose "tun0" ?  

 

thanks

Share this post


Link to post

Hello,

 

those instructions are quite outdated and are not fine for Mavericks, which should use pf as packet filtering tool, not ipfw.

 

First of all, be informed that OpenVPN clients are available in Android 4 or higher. https://airvpn.org/android

 

If you need to share the VPN connection on Mavericks please follow this Apple guide:

http://support.apple.com/kb/PH13855

 

keeping in mind that the interface you wish to share is tun0 (the network card used by OpenVPN), while the interface you wish to make accessible to the Android device is the WiFi card.

 

Kind regards

 

hello, 

 

 I can't seems to find tun0 interface on the "Share Your Connection From:" 

 

Maybe we can make a new interface by modifying preferences.plist like in:

http://stackoverflow.com/questions/87442/virtual-network-interface-in-mac-os-x/6375307#6375307

 

but again, in Mavericks plist look quite different, and I have no clue what value to be filled on the ConfigMethod under IPv4,

 

should I put tun0? [then It becomes disconnected with no IP]

 

or should I put DHCP?  [then It just become the second ethernet interface with another similar IP Address] 

 

 

please help.  

Share this post


Link to post

Hello,

 

true, in Mavericks the tun interface is UTUN and does not seem to be easily accessible by the user, we need to investigate.

 

Kind regards

Share this post


Link to post

Hello,

 

true, in Mavericks the tun interface is UTUN and does not seem to be easily accessible by the user, we need to investigate.

 

Kind regards

 

Hi there,

 

I want to do the same thing as Storophanthus. I would like to know if you managed to succeed in sharing your VPN connection with Mavericks, and if so how?

 

Many thanks!

Share this post


Link to post

I slightly tweaked the script in the tutorial mentioned by the OP. It works for me, although to disconnect I have to restart my computer every. single. time.

 

Note: after running ifconfig, I realized that for some reason my utun0 is occupied, so what was tunneling my internet traffic was utun1. Adjust accordingly for your own needs.

 

Hope it helps:

 

#!/bin/sh
 
natd -interface utun1
ipfw -f flush
ipfw add divert natd ip from any to any via utun1
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1
 
 

Share this post


Link to post

 

I slightly tweaked the script in the tutorial mentioned by the OP. It works for me, although to disconnect I have to restart my computer every. single. time.

 

Note: after running ifconfig, I realized that for some reason my utun0 is occupied, so what was tunneling my internet traffic was utun1. Adjust accordingly for your own needs.

 

Hope it helps:

 

#!/bin/sh
 
natd -interface utun1
ipfw -f flush
ipfw add divert natd ip from any to any via utun1
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1

 

 

hello, I'm now in Yosemite... it seems that natd is no more available and  ipfw is replaced by pfctl with built-in nat support.. this even make a greater headache ... 

 

still waiting for workaround on this.. should I make a new thread for Yosemite?

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
Sign in to follow this  

×
×
  • Create New...