Don’t Fear Flashing with I Don’t Want You!

The XDA message boards are full of various modifications, with many of these helping … more

Quo Vadis, Open {Source, Standards, World}? w/ Jan Wildeboer – XDA:DevCon 2014

Open Source was a big topic at this years XDA:DevCon … more

Android 5.0 Leaked for the Samsung Galaxy Note 3

Android Lollipop is still making its way to many new devices. Firmware updates have been … more

Learn to Sync Files Between Android And PC with Unison

Dropbox and similar cloud services are great if youre planning to keep your files … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[HOWTO] Wi-Fi Tethering on MIUI

OP k40u

27th July 2011, 08:00 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Jan 2011
Start the rom's wifi tether from Settings > System > Tethering & Portable Hotspot > Portable Wi-Fi hotspot.
You should be able to connect to it, but you won't be able to use the Internet.
Now set up the NAT manually, for which which I've found a tutorial online*. We'll want to connect ppp0 to wl0.1.
Open a root shell and enter the following. (Note that /proc/sys/net/ipv4/ip_forward is set to 1 automatically when we enable the rom's tethering)
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -i ppp0 -o wl0.1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wl0.1 -o ppp0 -j ACCEPT
Now you'll be able to access the Internet from your computer.

Disclaimer: I haven't tried turning it off yet. I assume you just remove the three rules and then turn off the rom's tethering.

*new users can't post links, so just Google "linux nat"
27th July 2011, 04:29 PM   |  #2  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
575 posts
Join Date:Joined: Oct 2010
More
Barnacle works fine for me, without any mods.
28th July 2011, 05:32 PM   |  #3  
kallell's Avatar
Senior Member
Thanks Meter: 26
 
358 posts
Join Date:Joined: Apr 2009
Quote:
Originally Posted by nunyazz

Barnacle works fine for me, without any mods.

ON miui rom?
28th July 2011, 05:52 PM   |  #4  
Senior Member
Thanks Meter: 400
 
1,116 posts
Join Date:Joined: Nov 2010
Donate to Me
More
http://www.revsys.com/writings/quicktips/nat.html

This link.
31st July 2011, 10:39 PM   |  #5  
Member
Thanks Meter: 0
 
39 posts
Join Date:Joined: Oct 2010
This works great. Is there any way to make these commands happen each time at startup? (Settings are lost on reboot)

Also does this have to run after wireless tether is enabled? Or does that not matter.
1st August 2011, 02:07 AM   |  #6  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
575 posts
Join Date:Joined: Oct 2010
More
Quote:
Originally Posted by kallell

ON miui rom?

Yes. Both MIUI and CM7
2nd August 2011, 08:24 PM   |  #7  
Junior Member
Thanks Meter: 1
 
21 posts
Join Date:Joined: Jun 2006
Quote:
Originally Posted by nunyazz

Yes. Both MIUI and CM7

Can you post details for CM7 here

http://forum.xda-developers.com/show....php?t=1198835

I tried but never got it working. Exact steps would be appreciated.

Thank you.
2nd August 2011, 09:00 PM   |  #8  
Senior Member
Thanks Meter: 400
 
1,116 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Quote:
Originally Posted by justinjbaron

This works great. Is there any way to make these commands happen each time at startup? (Settings are lost on reboot)

Also does this have to run after wireless tether is enabled? Or does that not matter.

Add them to init.rc
3rd August 2011, 06:22 AM   |  #9  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
575 posts
Join Date:Joined: Oct 2010
More
Quote:
Originally Posted by webwhacker

Can you post details for CM7 here

http://forum.xda-developers.com/show....php?t=1198835

I tried but never got it working. Exact steps would be appreciated.

Thank you.

Install Barnacle, turn it on.

That is all....
3rd August 2011, 06:30 AM   |  #10  
Neuman.Tim's Avatar
Senior Member
Flag Santa Barbara
Thanks Meter: 102
 
798 posts
Join Date:Joined: Oct 2010
same with wifi tether for me. install, go.

[Neuman]
SCH-I500 - EC09 Radio/MIUI FascinateMTD/Glitch V11.1 LL @1.2ghz -100mv/DarkWhite

Post Reply Subscribe to Thread

Tags
miui, tether
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes