Note:- I've found out that to achieve what I want, there is a simpler, more flexible way than reverse tethering. If you are ever in my situation, read the answer below.
I reverse tether internet from laptop via USB, and wan't to share it further by creating an Hotspot on my rooted android phone.
I get internet not just on my browser, but everywhere including Play Store and Whatsapp, when I reverse thether it from my laptop via USB.
The only issue is that when I start a WiFi hotspot on my phone so that other devices can share this internet, they don't get internet. How do I fix this?
Here is the commands I used to set up my phone to accept internet from my laptop:
ifconfig rndis0 10.42.0.2 netmask 255.255.255.0 route add default gw 10.42.0.1 dev rndis0 ifconfig ccmni0 0.0.0.0
ccmni0 is my Mobile Data interface and
rndis0 is the interface from which I get internet.
Why I want to do this is irrelevant to the question, but read on if you want to.
The reason for doing all this is that me and my room mate has to share a single LAN cable. Both of us run linux and have Broadcom WiFi cards, whose linux drivers don't allow you to create an AP from the laptop. I have linux only, while my friend uses linux only at times. When he is on Windows he creates a WiFi AP from his laptop using connectify. But when he is on linux, I want to temporarily create a hotspot via by mobile to share the internet.