Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,675 Members 46,363 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO] Wi-Fi Tethering on MIUI

Tip us?
 
k40u
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Jan 2011
Default [HOWTO] Wi-Fi Tethering on MIUI

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:
Select 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"
 
nunyazz
Old
#2  
nunyazz's Avatar
Senior Member
Thanks Meter 147
Posts: 574
Join Date: Oct 2010
Location: BTR
Barnacle works fine for me, without any mods.
 
kallell
Old
#3  
kallell's Avatar
Senior Member
Thanks Meter 26
Posts: 356
Join Date: Apr 2009
Quote:
Originally Posted by nunyazz View Post
Barnacle works fine for me, without any mods.
ON miui rom?
 
tonu42
Old
#4  
Senior Member
Thanks Meter 311
Posts: 1,003
Join Date: Nov 2010
http://www.revsys.com/writings/quicktips/nat.html

This link.
 
justinjbaron
Old
#5  
Member
Thanks Meter 0
Posts: 39
Join Date: 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.
 
nunyazz
Old
#6  
nunyazz's Avatar
Senior Member
Thanks Meter 147
Posts: 574
Join Date: Oct 2010
Location: BTR
Quote:
Originally Posted by kallell View Post
ON miui rom?
Yes. Both MIUI and CM7
 
webwhacker
Old
#7  
Junior Member
Thanks Meter 1
Posts: 21
Join Date: Jun 2006
Quote:
Originally Posted by nunyazz View Post
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.
 
tonu42
Old
#8  
Senior Member
Thanks Meter 311
Posts: 1,003
Join Date: Nov 2010
Quote:
Originally Posted by justinjbaron View Post
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
 
nunyazz
Old
#9  
nunyazz's Avatar
Senior Member
Thanks Meter 147
Posts: 574
Join Date: Oct 2010
Location: BTR
Quote:
Originally Posted by webwhacker View Post
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....
 
Neuman.Tim
Old
#10  
Neuman.Tim's Avatar
Senior Member
Thanks Meter 101
Posts: 797
Join Date: Oct 2010
Location: Santa Barbara
same with wifi tether for me. install, go.

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

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

Advanced Search
Display Modes


XDA PORTAL POSTS

Android 4.4.3 Begins Rolling Out to European HTC One M8

Shortly after the USA Unlocked and Developer Editions of the HTC One M8 received the … more

Modernize Your Emails with Email Popup

SMS andHangouts messages likely won’t ever replace traditional Emails for more formal … more

Change Your Toast Notification Style with XToast

Android uses multipletypes of notifications. One of these isknown as a toast notification. … more

Port Sony Xperia Themes to CyanogenMod 11 with Ease

In addition the obvious proficiency with graphics, creating agood Android theme … more