FORUMS

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, … more

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

[HOWTO] Wi-Fi Tethering on MIUI

1 posts
Thanks Meter: 0
 
By k40u, Junior Member on 27th July 2011, 07:00 AM
Post Reply Subscribe to Thread Email Thread
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, 03:29 PM |#2  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
More
Barnacle works fine for me, without any mods.
28th July 2011, 04:32 PM |#3  
kallell's Avatar
Senior Member
Thanks Meter: 26
 
More
Quote:
Originally Posted by nunyazz

Barnacle works fine for me, without any mods.

ON miui rom?
28th July 2011, 04:52 PM |#4  
Senior Member
Thanks Meter: 436
 
Donate to Me
More
http://www.revsys.com/writings/quicktips/nat.html

This link.
31st July 2011, 09:39 PM |#5  
Member
Thanks Meter: 0
 
More
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, 01:07 AM |#6  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
More
Quote:
Originally Posted by kallell

ON miui rom?

Yes. Both MIUI and CM7
2nd August 2011, 07:24 PM |#7  
Junior Member
Thanks Meter: 1
 
More
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, 08:00 PM |#8  
Senior Member
Thanks Meter: 436
 
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, 05:22 AM |#9  
nunyazz's Avatar
Senior Member
Flag BTR
Thanks Meter: 149
 
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, 05:30 AM |#10  
Neuman.Tim's Avatar
Senior Member
Flag Santa Barbara
Thanks Meter: 106
 
More
same with wifi tether for me. install, go.

[Neuman]
SCH-I500 - EC09 Radio/MIUI FascinateMTD/Glitch V11.1 LL @1.2ghz -100mv/DarkWhite
5th August 2011, 08:46 PM |#11  
Member
Thanks Meter: 1
 
More
i tried putting the commands in the init.rc under "on boot" but when i rebooted the file reverted back to what it was before i edited it and the backup of the original file i made was gone (init.rc.bak). can someone help me do this? i think the built-in tethering is just more convenient to use rather than installing barnacle and i'm hesitant to use it anyway cuz wifi tether didn't work for me

edit: i guess barnacle does work but i would still like to get this working if it doesn't get fixed in the next update
Last edited by manic020; 5th August 2011 at 09:02 PM.

Read More
Post Reply Subscribe to Thread

Tags
miui, tether
Previous Thread Next Thread
Thread Tools
Display Modes