Bridging Connections in Android - Networking

I've recently worked to get OpenVPN working on my Android CM7-based phone. This allows me to connect to my personal network from my phone which is great.
I'd like to take it a step further by allowing other computers to tether to my phone and then have access to the VPN that my phone is connected to. In other words, after connecting to my VPN from my phone, I want an arbitrary computer to USB or wifi tether to my phone, and then be able to access resources on the VPN.
I've found some semi-related posts, including one which describes reverse tethering over USB: http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
I think I know basically what needs to happen: The VPN and USB-tether network interfaces need to be "bridged" on the phone. This would allow the USB-tether network to talk to the VPN network. I'm sure this can be done via command line inputs but I'm not sure how. Any ideas? Thanks!

Bridging in Android
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.

EasyVictor said:
I've recently worked to get OpenVPN working on my Android CM7-based phone. This allows me to connect to my personal network from my phone which is great.
I'd like to take it a step further by allowing other computers to tether to my phone and then have access to the VPN that my phone is connected to. In other words, after connecting to my VPN from my phone, I want an arbitrary computer to USB or wifi tether to my phone, and then be able to access resources on the VPN.
I've found some semi-related posts, including one which describes reverse tethering over USB: http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
I think I know basically what needs to happen: The VPN and USB-tether network interfaces need to be "bridged" on the phone. This would allow the USB-tether network to talk to the VPN network. I'm sure this can be done via command line inputs but I'm not sure how. Any ideas? Thanks!
Click to expand...
Click to collapse
i am pretty much doing this already for months now,,
i am using droidvpn(helluva lot easier than managing openvpn to work)
then i use another app to tether,,,
in my case i use open garden or wifi thether for root users...
works for me...i open droid vpn first once connected i open the tethering app,...
if youre using usb cable to tether just look for the app that does that...
i think clockwork tether should work..
here is the link
https://play.google.com/store/apps/...wsMSwxLDEsImNvbS5rb3VzaGlrZHV0dGEudGV0aGVyIl0.
reverse thethering is a different concept thou,,,your phone will get internet from pc.....
hope it helps..

Almost
zeusseuz said:
i am pretty much doing this already for months now,,
i am using droidvpn(helluva lot easier than managing openvpn to work)
then i use another app to tether,,,
in my case i use open garden or wifi thether for root users...
works for me...i open droid vpn first once connected i open the tethering app,...
if youre using usb cable to tether just look for the app that does that...
i think clockwork tether should work..
here is the link
https://play.google.com/store/apps/...wsMSwxLDEsImNvbS5rb3VzaGlrZHV0dGEudGV0aGVyIl0.
reverse thethering is a different concept thou,,,your phone will get internet from pc.....
hope it helps..
Click to expand...
Click to collapse
Thanks for the reply. Well, from what I can tell, DroidVPN is a service that lets you VPN into a public server for the purpose of redirecting your traffic and avoiding firewalls, etc. I'm not trying to redirect my traffic to a public VPN, I'm trying to connect to my own VPN. I have my own VPN server that I'd like to connect to, and then allow tethered computers from my phone access those VPN resources. Even if DroidVPN allows you to connect to your own VPN, I don't want to direct all my traffic to it; only requests for resources on that network. For example, with OpenVPN, if I make a website call to google.com, it goes through the phone's internet connection. But if I access an IP located on my VPN, it goes through the OpenVPN connection. Does DroidVPN allow that?

njdevi11 said:
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.
Click to expand...
Click to collapse
Interesting. How does the bridging module work? Do you run a command to bridge certain interfaces? If you have success, I'd like to try it out for bridging the tether network to the vpn tunnel.

EasyVictor said:
Thanks for the reply. Well, from what I can tell, DroidVPN is a service that lets you VPN into a public server for the purpose of redirecting your traffic and avoiding firewalls, etc. I'm not trying to redirect my traffic to a public VPN, I'm trying to connect to my own VPN. I have my own VPN server that I'd like to connect to, and then allow tethered computers from my phone access those VPN resources. Even if DroidVPN allows you to connect to your own VPN, I don't want to direct all my traffic to it; only requests for resources on that network. For example, with OpenVPN, if I make a website call to google.com, it goes through the phone's internet connection. But if I access an IP located on my VPN, it goes through the OpenVPN connection. Does DroidVPN allow that?
Click to expand...
Click to collapse
i was just using droidvpn for example..
i am also using open vpn...
i use both vpns depending on the time of the day,
i am connected to vpns to make viber calls.
and also to tether to my pc ,make google voice calls as well...
maybe i am not understanding what you want to do i guess

Brctl
EasyVictor said:
Interesting. How does the bridging module work? Do you run a command to bridge certain interfaces? If you have success, I'd like to try it out for bridging the tether network to the vpn tunnel.
Click to expand...
Click to collapse
I got my nexus S back from my friend and compiled bridging into a cyanogenmod kernel, this yeilds a bunch of kernel modules you will need to load onto the device:
bridge.ko
llc.ko
p8022.ko
psnap.ko
stp.ko
The modules loaded and I was able to create a bridge i haven't had time to further test this yet but i have no reason to believe it wont work.
The command you use to control the bridging is brctl which is built into busybox.
Here's what you do:
You would have to remove all the ip's from both interfaces and then add them back to the bridge when you're done.
su
#create the bridge
busybox brctl addbr br0
#add usb0 to the bridge
busybox brctl addif br0 usb0
#add eth0 to the bridge
busybox brctl addif br0 eth0
#give the bridge interface an ip and bring it up
busybox ifconfig br0 192.168.1.1 netmask 255.255.255.0 up

'brctl' applet not found
njdevi11 said:
The command you use to control the bridging is brctl which is built into busybox.
Here's what you do:
You would have to remove all the ip's from both interfaces and then add them back to the bridge when you're done.
su
#create the bridge
busybox brctl addbr br0
#add usb0 to the bridge
busybox brctl addif br0 usb0
#add eth0 to the bridge
busybox brctl addif br0 eth0
#give the bridge interface an ip and bring it up
busybox ifconfig br0 192.168.1.1 netmask 255.255.255.0 up
Click to expand...
Click to collapse
What version of busybox you tried? Or I need more complete installation of busybox?
Here is what I got.
su
[email protected]:/ # busybox brctl
brctl: applet not found
My busybox is
Busybox v1.21.1-Stericson (2013-09-26 14:33:26) multicall-binary

I am interested
njdevi11 said:
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.
Click to expand...
Click to collapse
I need to exactly that for Android-x86 4.3. I am using version android-x86-4.3-20130725.iso.
If you can patch this version and give ne a new ISO or an *.apk, I can compensate you via Pay Pal.
The key point is make-believe all apps that wifi is working, possibly 4 G as well.
I use KVM as virtualization platform, so there is no real hardware.

Hi,
I'm looking for a similar solution (I tried to connect with my wifi to an accesspoint to provide internetaccess to the accesspoint thru the mobile network)
Two challenges:
wifi and mobile network have to enabled and connected
create the bridge between wlan0 and rmnet0
expected result: the access point got a stable connection to wlan0 an the requests to the web from the accesspoint routet thru wlan0 to rmnet0 into the www
unfortunately my busybox throw this message:
Code:
1|[email protected]:/ # busybox brctl show
busybox brctl show
brctl: SIOCGIFBR: Package not installed
how could I fix it?
rooted HTC one mini with android 4.4.2

Related

USB reverse tether needed bad!

i.e. to access a PC's internet connection from the phone for data via USB (NOT use phone's 3G connection!)
My problems;
3G Data from my provider costs $269 a GB!
My PC has wireless internet but through a USB modem, not a router.
Cannot share the connection with a WiFi router as routers (or mine anyway) don't have a USB connection, ie I can't plug the USB modem into my router.
I can share data through a wireless dongle but only via ad-hoc network, but I can't seem connect my Dream to ad-hoc networks and am not even sure that it will be able to share the internet once connected. I've tried various Wifi tether applications.
So a USB tether app would be perfect. Else how can I use my PC's internet connection for data on the phone?
HTC Dream rooted and running CM4.2.8
Correction in title, YOU need a reverse teether.
WIFI is not hard to comeby, comeon.
The Dream can connect to ad-hoc networks, but ask that in Q&A.
No, I'm not the only one, this is a question that has been asked quite a few times before.
Also having read through many posts I have found no reference to anyone that has actually successfully shared the PC's internet connection to the phone with an ad-hoc network.
Wait a sec, you said that you have a WiFi router? A separate device from the USB modem?
1. Connect the router to your PC via Cat 5
2. Set up routing on your computer (ICS if you are running windows)
3. Set up the wireless part of the router
4. Connect the Phone to the router WiFi.
5. Use the WiFi normally from your phone.
This might help until someone can get reverse WiFi or USB tethering to work.
t1n0m3n said:
Wait a sec, you said that you have a WiFi router? A separate device from the USB modem?
1. Connect the router to your PC via Cat 5
2. Set up routing on your computer (ICS if you are running windows)
3. Set up the wireless part of the router
4. Connect the Phone to the router WiFi.
5. Use the WiFi normally from your phone.
This might help until someone can get reverse WiFi or USB tethering to work.
Click to expand...
Click to collapse
Look carefully to the topic. It has written USB not wireless.
kiiiiiid said:
Look carefully to the topic. It has written USB not wireless.
Click to expand...
Click to collapse
That would be why it is called a work around. The suggestion is a response to this statement "Else how can I use my PC's internet connection for data on the phone?" from the OP.
pardus said:
No, I'm not the only one, this is a question that has been asked quite a few times before.
Also having read through many posts I have found no reference to anyone that has actually successfully shared the PC's internet connection to the phone with an ad-hoc network.
Click to expand...
Click to collapse
I've shared internet with G1 via ad-hoc without problem. The solution I found in Q&A section
1. Get a Wireless router
2. Plug ethernet cable from PC to Internet Input on Router
3. In Windows control panel, edit the wireless connections settings to shared
4. Connect to the router and setup wireless network settings
5. Connect to wireless network with phone
There you have it, easy steps to do what you need.
After hours of 'googling', it seems that's it's impossible to get my router to share a USB modem's connection (http://forum1.netgear.com/showpost.php?p=68070&postcount=5)
@g1DDriver: Please show me where, I've searched but can't find it?
@Wisefire: 2. Plug ethernet cable from PC to Internet Input on Router - if I do that I cannot connect to the router at all, ipconfig shows the ip address as 192.168.1.2 but a browser just doesn't see it.
just buy a wireless router. they cost what, like 10$ now while on sale?
kb8to24 said:
just buy a wireless router. they cost what, like 10$ now while on sale?
Click to expand...
Click to collapse
could also try this
http://www.readwriteweb.com/archives/watch_out_wifi_here_comes_mifi.php
kb8to24 said:
just buy a wireless router. they cost what, like 10$ now while on sale?
Click to expand...
Click to collapse
perhaps you're not reading my first post correctly, I have a wireless router...
...and anyway is it even possible to plug a USB modem into a router, it would need drivers & software which the the router can't handle?
My ISP also has their own proprietary modems (http://www.iburst.co.za/default.aspx?link=hardware_modems) which are very pricey, so I'm not getting another modem either.
I've been trying to set-up an ad-hoc network using the instructions here: http://blog.joint.net/2009/07/connecting-android-phone-through-adhoc.html
but having no luck.
Who'd of thought something so painlessly simple in WM6 would be a nightmare in Android
pardus said:
My ISP also has their own proprietary modems (http://www.iburst.co.za/default.aspx?link=hardware_modems) which are very pricey, so I'm not getting another modem either.
Click to expand...
Click to collapse
From that link, which modem do you have. A model # would be nicer.
Also, what is the model # of your router?
What OS are you using?
pardus said:
@Wisefire: 2. Plug ethernet cable from PC to Internet Input on Router - if I do that I cannot connect to the router at all, ipconfig shows the ip address as 192.168.1.2 but a browser just doesn't see it.
Click to expand...
Click to collapse
That would be because you are trying to manage the router from the WAN port... If you want to be able to do this you need to enable remote management. (Connect PC to inside, enable remote management, the connect to outside (WAN port) and use the http:// 192.168.1.1:8080 or whatever you set the port RM to)
The modem I have is "USB Modem for laptops and desktops"
Router is the Netgear WGR614v7 and OS is Win XP
I see a couple of things that could have prevented you from making this work.
By default the Netgear router gives 192.168.1.0 (mask of 255.255.255.0) to the inside. You cannot use the same network between the computer and the router. I would change the network on the inside of the router to 192.168.5.1 255.255.255.0. (Just change the 1 to a 5 in the router settings.)
ftp://downloads.netgear.com/files/wgr614v7_ref_manual_20apr06.pdf
So connect your PC to one of the four ports. Let it get an IP address. Connect to http://www.routerlogin.net (Per the instructions in the PDF.) Login and change the inside address pool to 192.168.5.1 255.255.255.0. (Instructions are at Chapter 6, "Using the LAN IP Setup Options" in the PDF above.) Reboot the router.
Connect to http://www.routerlogin.net again. Login and enable remote management. (Instructions are Chapter 6, "Enabling Remote Management Access" in the PDF above)
Enable Internet Connection Sharing on your computer.
Reboot the router again.
Once the router connects again, open a command prompt and do a "arp -a" (without the quotes) and get the IP address of the router. (It will be the IP address in the 192.168.1.x range that is *not* listed in an ipconfig from the command prompt)
Connect to that IP address (for example http://192.168.1.6:8080) and continue on setting up the wireless part normally.
Once you connect your phone to WiFi the connection flow looks something like this:
Phone = 192.168.5.21 > NAT > 192.168.1.6 <routed> 192.168.1.1 (IP of your Wired NIC on the computer) > NAT > USB NIC IP address > Internet
Of course the IP addresses above are just guesses as to what you will actually see.
Hopefully this will get you going well enough until someone gets reverse tethering to work.
Reverse tether g1 to pc network over usb cable
My android os is CyanogenMod 4.2.14.1,
1.Enable "Settings\Wireless controls\Internet tethering"
2.Install HTC Remote NDIS based Device driver(View attachment 277122)
3.Set the HTC adapter as: IP:192.168.2.1, Mask:255.255.255.0
4.Set the PC ethercard as shared connection
5.Run these codes in terminal:
su
ifconfig usb0 192.168.2.2 netmask 255.255.255.0
busybox route delete default
iptables -F
iptables -F -t nat
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
6.Now your g1 could open browser to view any web pages on the internet, and update apps in the Market.
for diyism

Any way to share desktop internet with droid by USB?

Hey there.
I´ve searched the forums but i didnt found for a way to share a desktop internet connection with the phone by USB.
There are many ways to tether (share phone connection with the desktop/laptop, wired or wireless), but are there any way to share internet the opposite way?
Thanks!
Dont think so.
As far as I know, there is only one option to connect to internet through PC. You can connect by WiFi, but only with Windows 7, because Desire can't connect to ad-hoc network.
If you are interested in this subject, go to connectify.me
Thanks for your help!
YES if you have windows 7 and wifi.
Sorry to bump this but was a big deal for me also and I found a solution.
I use a peice of software called connectify (google it) which uses some new part of windows 7 networking to allow you to turn your computer into a wifi router.
It even works when connected via wifi which obviously it pointless if you have wifi already. We dont at work so I use it then and have about 6 others connected from thier desires with no effect on me.
HI
I have found the solution to share PC's internet on mobile via USB. I am using ubuntu 10.04 and HTC dream with superfroyo2.2. I just did the following:
First of all, connect the PC to Phone via usb. and enable tethering on phone. (Don't panic. I am going to tell you how to do the reverse of it.)
Your PC will get the IP 192.168.42.37 and mobile will have the IP 192.168.42.129.
Settings on PC
sysctl net.ipv4.ip_forward=1
Above command will enable routing on the PC.
Now go to your phone via adb shell
and give following commands;
#setprop net.dns1 8.8.8.8
also need to set default gw using
# busybox route add default gw 192.168.42.37
by above commands on mobile you have set the dafault gateway to be PC's IP and also set the DNS.
and BINGO..your internet should work on mobile now.
If you still get some problem, then troubleshoot it step by step. First ping your PC from mobile and mobile from PC, both should ping each other and make sure, your PC is connected to internet and there is no firewall or antivirus on the PC that may block incomming traffic from mobile.
As a further test you can give following command to enable NAT on your PC:
// iptables -t nat -A POSTROUTING -s 192.168.42.0/24 -j MASQUERADE
I did not use this command and natting was done without this command on my PC, my be due to some error or other configurations that I don't know but its good for me that its working without it
HD roms had that IIRC
Sent from my HDfied HTC Desire
i dont think its possible right now :/

[Guide] Reverse USB Tethering step by step

hello everyone!
I was trying to find a way to connect my iconia via usb with my laptop and use my internet access for instances that wifi isn't available.
I searched a lot but there wasn't any usefull clear guide. So after some failing attempts, finally i managed to succeed (using win 7). Here are the steps:
*root is required*
1. install http://code.google.com/p/android-wired-tether/ (i used stable version 1.2 but i don't think 1.4 will make any problems) but do not enable it yet.
2. Install USB drivers from Android SDK instructions found here: http://developer.android.com/sdk/win-usb.html , later you will also need RNDIS drivers because when you connect the tablet with your pc and enable wired tether it will install the drivers. I found working drivers from HTC sync located at C:\Program Files (x86)\HTC\HTC Driver\Driver Files\Win7_x64\htcrndis.inf
you have to install them manually from the device manager (pick the: HTC Remote NDIS based device)
3. now that we have completed the installation with Wired Tether (still leave it running), we are ready to proceed to the next step. Open network connections. You will notice that now there is one more. (in my case no1 is local area and no2 local area 5 (the one wired tether created). select the connection you want to share go to properties and enter "sharing tab". tick "Allow other network users to connect through this computer's Internet connection" and pick the connection made by wired tether. Hit apply and you will have bridged the two connections.
4. open any emulator on your tablet and type:
Code:
su
ifconfig usb0 192.168.1.9 netmask 255.255.255.0 up
route add default gw 192.168.1.1 dev usb0
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
netcfg usb0 dhcp
at ifconfig command you enter an available ip of your router for example if your pc is connected to 192.168.1.7 you can pick 192.168.1.9 that is free.
at the second line enter the default gateway of your internet connection found under the detailed view of its options.
setprop "net.gprs.http-proxy" "" is in case you are NOT behind a proxy server
5. wait about 15 seconds and...
enjoy!
each time you enable wired tether you have to type in:
su
netcfg usb0 dhcp
to undo the hole "reverse usb" thing, simply unbridge the 2 connections, restart wired tether and you are ready to use it for normal tethering.
browsers work fine, facebook, pulse, tunein. i haven't tested many apps yet...
issues: Market browsing is ok but downloading apps not, some apps do not work.
p.s: it's my first guide so if something seems confusing or unclear, please forgive me!
interesting... question... why do you do " setprop "net.gprs.http-proxy" """?
i'm asking because maybe this is what i'm missing in my usb 3g for my wifi only
thor2002ro said:
interesting... question... why do you do " setprop "net.gprs.http-proxy" """?
i'm asking because maybe this is what i'm missing in my usb 3g for my wifi only
Click to expand...
Click to collapse
forgot to implement the source link...
comments to focus are:
Rugga said...
I'm using Windows 7. I shared my ethernet internet connection to the USB tether device.
In console emulator on the phone I typed:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb1
I can ping the gateway, I can also ping the web by IP address, eg 64.233.181.104 for google.com
What I can't do is use the browser or ping by domain name. I tried:
setprop net.usb1.dns1 192.168.2.1; and
setprop net.dns1 192.168.2.1
Click to expand...
Click to collapse
OK it is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb0 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Click to expand...
Click to collapse
it gave me a headache trying to understand what exactly does this line...
the only thing i managed to figure out is tha it redirects and leaves blank proxy server via gprs connection... is it a fake connection (gprs) that blocks data transfer via usb from apps? the only sure thing is that these 2 lines with setprop command fixed the issue with the apps (browser and others)...
first is google's dns, probably necessary as well...
btw great job with the modules!
A quick question
Is this Iconia-specific or can the same method be used on any Android device provided we have working RNDIS drivers for it?
The way it appears to me, I don't see why it shouldn't work on other devices but please correct me if I am wrong.
HQRaja said:
Is this Iconia-specific or can the same method be used on any Android device provided we have working RNDIS drivers for it?
The way it appears to me, I don't see why it shouldn't work on other devices but please correct me if I am wrong.
Click to expand...
Click to collapse
in devices which already have the tethering ability, the hole wired tether thing doesn't need installation, so it is easier and i think it will work on any android based devices. so give it a try!
probably you won't even need to install RNDIS drivers, but in any case the HTC ones work like a charm (some other that i tried crashed windows upon connection).
you don't have to get specific RNDIS drivers especially for your device cause they are used for connecting usb devices used as network ones.
so... give it a try!
Exactly what i need desperately, i have a wifi signal which is very poor, i use external antenna to boost wifi signal. This external antenna has no drivers for android for sure, therefore i need to do reverse tethering to share internet connection from my computer.
I tried to use your guide but i think it needs a bit more details. I installed android tethering 1.4 but i am stuck at step 2 cause at this step when i turn on debugging mode on iconia then PC searches for drivers but doesn't accept the ones i downloaded from android SDK.
Kindly help me with this, i will be grateful for that.
Thanks.
usman3206 said:
Exactly what i need desperately, i have a wifi signal which is very poor, i use external antenna to boost wifi signal. This external antenna has no drivers for android for sure, therefore i need to do reverse tethering to share internet connection from my computer.
I tried to use your guide but i think it needs a bit more details. I installed android tethering 1.4 but i am stuck at step 2 cause at this step when i turn on debugging mode on iconia then PC searches for drivers but doesn't accept the ones i downloaded from android SDK.
Kindly help me with this, i will be grateful for that.
Thanks.
Click to expand...
Click to collapse
Hi! Sorry for my late answer to that. I've been away for a while...
try the drivers that are located at http://acer.us/ac/en/US/content/drivers
pick tablet, iconia tab, a500 and then download the usb drivers.
Any chance to enable this with an android phone? Wired tethering from the phone I mean.
There's actually a free program @ http://www.connectify.me
Its for Windows and they are developing an android app as well. But the windows software is quite easy and makes your computer or laptop a "hotspot" to connect multiple devices too.
enjoy!
Bec07 said:
Any chance to enable this with an android phone? Wired tethering from the phone I mean.
Click to expand...
Click to collapse
i'll give it a try (i assume you mean via usb connection).
connectify is for wireless networking. the hole reverse usb tethering thing is based on usb connection without any participation of a wireless network at all.
the majority of the latest android phones can become a hotspot natively anyway.
He does not want to install the driver from HTC. There are other options?

let's figure out a way to choose a wireless network connection over a wired one

I've searched everywhere online, and it seems that the only way to do this is to remove the ethernet cable from either the router/switch/ATV.
can anyone think of any ideas to get around this? it probably won't work, but I'm downloading different network manager apps in the hopes that it would allow me to just this. I have a feeling that this won't work, but it's worth a shot.
shutterslaps said:
I've searched everywhere online, and it seems that the only way to do this is to remove the ethernet cable from either the router/switch/ATV.
can anyone think of any ideas to get around this? it probably won't work, but I'm downloading different network manager apps in the hopes that it would allow me to just this. I have a feeling that this won't work, but it's worth a shot.
Click to expand...
Click to collapse
why do you wan't to use wireless connection over wired? do u have tried to also connect to wifi while connected wired?
if it's because app only use wifi and you are rooted and have xposed installed u might use the fake wifi module
http://forum.xda-developers.com/xposed/modules/app-fake-wifi-connection-t2800416
installed via xposed. works like charm for me...
The best connection is always the connection that gets used. A wifi connection is not as stable of as powerful as an ethernet connection and thats why computers always use the ethernet connection over the wifi connection. If you wanna use wifi, disconnect the ethernet cable. Its the same with mobile devices, if you have your mobile data on and wifi on, it will more than likely pick the wifi connection, cause wifi is usually better than mobile data. My mobile data never ever kicks on over my wifi connection.
shutterslaps said:
I've searched everywhere online, and it seems that the only way to do this is to remove the ethernet cable from either the router/switch/ATV.
can anyone think of any ideas to get around this? it probably won't work, but I'm downloading different network manager apps in the hopes that it would allow me to just this. I have a feeling that this won't work, but it's worth a shot.
Click to expand...
Click to collapse
As others have said, wired is preferred over wireless for multitude of reasons. But, if you do want to use Wifi when you have an ethernet cable hooked into FTV, you can use this from adb shell:
To bring down your wired network card: busybox ifconfig eth0 down
To bring back up: busybox ifconfig eth0 up
Once you bring down your wired connection, you should be able to navigate to your wireless settings on FTV and go wifi without physically disconnecting your wired cable.
This will not persist across reboots. You will need to include appropriate code in your startup script to make that happen.
thanks everyone! I'm going to try all of these after I eat.
I agree, a wired connection is without a doubt better and preferable. However, the building I live in only offers a free wifi connection that is installed throughout the building. I'll be looking to see if I can get my own internet connection soon.
When I have the AFTV connected through ethernet, and I want to SSH, or ADB into the AFTV from my computer, I cannot for some reason. I figured it would work since the wifi and wired connections are technically the same network, right? I also can't use any remote apps from my phone since the phone is on wireless.
I usually disconnect the ethernet cord, and create a wifi connection from my macbook, or tether my connection from my phone and connect my laptop and ATV to that network. I'm just looking for a way to be able to do all of this without having to get up and take out the ethernet cord everytime. It's not that I'm lazy, I just have this external fixation on my leg from an injury.
Xfinity app
I used the xfinity app to stream cable on my aftv... I got tired of buffering so switches to ethernet.. The app thinks im out of my wireless network... Can we spoof wifi on this like some of the old apps for jailbroken iphones or in xposed? . I too want to trick my box into thinking ethernet is wifi so xfinity wont think im not on my network...
so let me see if i have this right:
1) you want AFTV to use wireless for internet
2) you want AFTV to use wired for administration/etc
if so --- setup wireless as usual, let it dhcp and do its thing....and setup your WIRED manually leaving the default gateway blank or unconfigured. This will force all traffic bound for hosts not available via wired interface to the WLAN (and the internet).
since the AFTV and your laptop/etc are wired and on the same subnet, they don't need to be routed to communicate and they will work fine. Any other traffic need to be routed, and the only outbound route your AFTV will know is via the wireless interface.
for example:
AFTV wireless: 192.168.0.10, gateway 192.168.0.1 (or whatever dhcp gives you)
AFTV ethernet: 10.10.10.1 gateway (blank)
Laptop wireless: 192.168.0.11, gateway 192.168.0.1 (or whatever dhcp gives you)
laptop ethernet: 10.10.10.2 gateway (blank)
you can then use the 10.10.10.x addresses via ethernet to communicate via local ethernet without disturbing the default internet route and internet access.
mattvirus said:
so let me see if i have this right:
1) you want AFTV to use wireless for internet
2) you want AFTV to use wired for administration/etc
if so --- setup wireless as usual, let it dhcp and do its thing....and setup your WIRED manually leaving the default gateway blank or unconfigured. This will force all traffic bound for hosts not available via wired interface to the WLAN (and the internet).
since the AFTV and your laptop/etc are wired and on the same subnet, they don't need to be routed to communicate and they will work fine. Any other traffic need to be routed, and the only outbound route your AFTV will know is via the wireless interface.
for example:
AFTV wireless: 192.168.0.10, gateway 192.168.0.1 (or whatever dhcp gives you)
AFTV ethernet: 10.10.10.1 gateway (blank)
Laptop wireless: 192.168.0.11, gateway 192.168.0.1 (or whatever dhcp gives you)
laptop ethernet: 10.10.10.2 gateway (blank)
you can then use the 10.10.10.x addresses via ethernet to communicate via local ethernet without disturbing the default internet route and internet access.
Click to expand...
Click to collapse
it's actually the other way around.
1) I want AFTV to use wired for internet
2) I want AFTV to use wireless for administration/etc
I can't ssh/adb/etc without taking the ethernet cord out and connecting the AFTV and laptop to the same wireless network. I was hoping for a way to shut down the ethernet connection, so I can connect over wifi without taking out the ethernet cord. The AFTV won't let you connect to a wireless network if the ethernet cord is plugged in and connected.
I actually figured out a way to do what I need without taking out the ethernet cord.
What I do is:
1) SETTINGS (not the one that came with the AFTV, it's a settings.apk I installed)
2) under WIRELESS & NETWORKS click 'More...'
3) TETHERING & PORTABLE HOTSPOT
4) CONFIGURE WI-FI HOTSPOT
5) activate the hotspot and connect to that network from the laptop
dbdoshi said:
As others have said, wired is preferred over wireless for multitude of reasons. But, if you do want to use Wifi when you have an ethernet cable hooked into FTV, you can use this from adb shell:
To bring down your wired network card: busybox ifconfig eth0 down
To bring back up: busybox ifconfig eth0 up
Once you bring down your wired connection, you should be able to navigate to your wireless settings on FTV and go wifi without physically disconnecting your wired cable.
This will not persist across reboots. You will need to include appropriate code in your startup script to make that happen.
Click to expand...
Click to collapse
just gave that a try. now I have two methods to achieve what I looking to do. appreciate it!

S8 Ethernet/4G routing

I've a rooted SG-950F, using AFWall+, busybox etc etc Android 7.0
I can connect a USB Ethernet adapter and set a static IP and it all connects perfectly
I can connect to 4G and access everything as expected
I can USB tether, adb, Wifi Hotspot etc
My question: Can I connect the 4G and set the Ethernet Gateway to be 4G? making it into a 4G ethernet "dongle" or router
Anyone know what routes to add, iptables rules etc?
DNS lookups aren't a big issue as I could use local/hosts/IP etc
(ifconfig and use the 4G gateway and local network seems too simple as does 127.0.0.1)
This is to allow a non-usb non-wifi device on an Ethernet connection to access the internet via 4G
WeegieTV said:
I've a rooted SG-950F, using AFWall+, busybox etc etc Android 7.0
I can connect a USB Ethernet adapter and set a static IP and it all connects perfectly
I can connect to 4G and access everything as expected
I can USB tether, adb, Wifi Hotspot etc
My question: Can I connect the 4G and set the Ethernet Gateway to be 4G? making it into a 4G ethernet "dongle" or router
Anyone know what routes to add, iptables rules etc?
DNS lookups aren't a big issue as I could use local/hosts/IP etc
(ifconfig and use the 4G gateway and local network seems too simple as does 127.0.0.1)
This is to allow a non-usb non-wifi device on an Ethernet connection to access the internet via 4G
Click to expand...
Click to collapse
Look into root tethering solutions. What you describe is exactly how wifi tethering works, just over WiFi instead of the Ethernet adapter. You should be able to modify a custom tether mod to reference the Ethernet device instead
partcyborg said:
Look into root tethering solutions. What you describe is exactly how wifi tethering works, just over WiFi instead of the Ethernet adapter. You should be able to modify a custom tether mod to reference the Ethernet device instead
Click to expand...
Click to collapse
thanks for the response but I think that may be a wee bit above my current skills, could you recommend a simple app that would be easy to tweak?

Resources