[Samsung Galaxy Nexus] Solarusj:
trying to use this with stock pptp vpn

Guys I have tried to follow both of these with no success can you help

Hi Guys

I have managed to successfully root my UK Vodafone 2.3.3 Desire Z and get the new Andromadus Jelly Belly build installed no problem.

I am really impressed with the build btw.... It is very stable and very fast

Here is my problem

I have setup an inbound connection on a Windows 7 host for PPTP VPN so that all of my mobile internet traffic is transparent and routes through my personal Fiber connection. The connection itself works great and I can connect my handset via its mobile data connection no problem to the VPN and all traffic from the handset goes through the VPN. However, if I enable WIFI Tethering the handset is still ok however, any devices connecting to the hotspot can connect ok but can't go anywhere. I did notice yesterday that it does seem to resolve internet DNS queries and a tethered device can ping the VPN assign DHCP address of the connected hotspot handset but no other IPs on that subnet

I have tried the following supplimenting tun0 with ppp0 as per the attached screen shot and I tried to attempt doing it the second way too however, when I do an ip rule show I don't get a specific table setting for tethering so that was a no go.

Here are the instructions that I followed from - http://xdaforums.com/show...1766020&page=2

My setup:

- Samsung Galaxy Note Ics 4.0.4

- Openvpn for Android ( does not need root, might work with other vpn)

- Active data connection

- wifi tethering (should work also with usb)

Prerequisites:

- a root-ed phone

- a terminal

You need to issue 3 commands:

0) launch terminal and become root

yourprompt> su

yourprompt#

1) allow FORWARDING of vpn data (this will allow ALL forwarding)

yourprompt# iptables -A FORWARD -j ACCEPT

2) change NAT to MASQUERADE from ALL interfaces

yourprompt# iptables -t nat -A POSTROUTING -j ACCEPT

3) route traffic in specific tethering routing table

3a) see table for tethering (in my setup is table '60')

yourprompt# ip rule show

3b) add your private address (myne is 172.16.0.0/16) to the tethering table

yourprompt# ip route add 172.16.0.0/16 dev tun0 table 60

Think this is slightly overcomplicated. Here is a more simple method that should work for everyone:

Download a terminal client, e.g. ConnectBot and connect to your local shell.

Enter `su` to become root. (Double check with whoami afterwards).

Enable wifi tethering and ensure your data connection is working (connect to VPN)

Run `netcfg` and note your interface names (typically tun0 and wlan0 (ignore m.wlan0 or similar, only take the one with a real mac address), as is on my SGSII)

Double check the subnet for your wlan0 device and enter the following commands:

iptables -A POSTROUTING -s 192.168.43.0/24 -j MASQUERADE -t nat

(setup a postrouting entry for the tethered devices subnet, implementing NAT)

iptables -A FORWARD -j ACCEPT -i wlan0 -o tun0

forward packets from tethered devices across the tunnel

iptables -A FORWARD -j ACCEPT -i tun0 -o wlan0

forward packets from the tunnel to the tethered devices

and here is my netcfg and 'ip rule show'

Any help would be really appreciated guys.