S8 Ethernet/4G routing - Samsung Galaxy S8 Questions and Answers

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?

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

Xbox Live Moderate NAT on Hotspot/Tether

Is there a clear tutorial on setting the NAT to open on Xbox Live? I'm tethering off my Verizon 4G LTE phone.
Of course theres a way.
juryben said:
Is there a clear tutorial on setting the NAT to open on Xbox Live? I'm tethering off my Verizon 4G LTE phone.
Click to expand...
Click to collapse
I was never able to find one that was complete... through trial and error I found a solid usb method. Now my only problem is this POS LG Revolution with no man support or ROMs. Seems I have to tether through EasyTether to maintain a solid connection (anyone know why?) otherwise it poops out after a couple minutes randomly which sucks because I've had my best tether 4g speeds through 3 rarely talked about apps, Tether Pop-Up and Auto-Usb Tether and SVTP no idea why but they kick the crap out of PDANet, Clockwork Tether, EasyTether. With the auto enablers / widgets I get 18-40DN / 6-12UP MB/S on speedtest.net the only way my tethering speed came close to matching my true phone 4g speeds the most Ive ever seen from the others was 7mbs dn 3up thats with easytether. So first find a tethering method that works the fastest with a solid connection (you need it otherwise constant disconnects and probation waiting for matches).
Now share your connection via pc/mac network card/ethernet cable to a Router (it must support an NZB Server)'s internet port. Set your xbox up to be a set IP address mines 192.168.1.4. leave everything else blank except dns = google for phone, pc and xbox network settings. Then login to your router generally under WLAN Setup you'll find "Default DMZ Server" enter your Xbox IP address in fields. Check to make sure MTU Size is 1500 and NAT Filitering "Open". I disable SIP ALG too if optional. Check to make sure your connection from PC is being shared and used as gateway ect in your main status and thats it. Connect to router via wireless or ethernet (faster). DMZ basically creates a port server for the xbox-router any port the xbox wants open nzb opens it (was what I understood). If your still not getting your xbox to say Open NAT make sure ips match router DMZ and xbox (dhcp crap messes it up sometimes), start opening ports on the router, pc and android for xbox you can get list of ports for COD via google and portforward on android and complete firewall bypass on pc can help too. You can achieve OPEN by simply getting all ports necessary but DMZ method much easier. As far as I know you need a DMZ capable Router you cannot WiFi tether to xbox and get open or any other way without a router to my knowledge.
gigilie said:
I was never able to find one that was complete... through trial and error I found a solid usb method. Now my only problem is this POS LG Revolution with no man support or ROMs. Seems I have to tether through EasyTether to maintain a solid connection (anyone know why?) otherwise it poops out after a couple minutes randomly which sucks because I've had my best tether 4g speeds through 3 rarely talked about apps, Tether Pop-Up and Auto-Usb Tether and SVTP no idea why but they kick the crap out of PDANet, Clockwork Tether, EasyTether. With the auto enablers / widgets I get 18-40DN / 6-12UP MB/S on speedtest.net the only way my tethering speed came close to matching my true phone 4g speeds the most Ive ever seen from the others was 7mbs dn 3up thats with easytether. So first find a tethering method that works the fastest with a solid connection (you need it otherwise constant disconnects and probation waiting for matches).
Now share your connection via pc/mac network card/ethernet cable to a Router (it must support an NZB Server)'s internet port. Set your xbox up to be a set IP address mines 192.168.1.4. leave everything else blank except dns = google for phone, pc and xbox network settings. Then login to your router generally under WLAN Setup you'll find "Default DMZ Server" enter your Xbox IP address in fields. Check to make sure MTU Size is 1500 and NAT Filitering "Open". I disable SIP ALG too if optional. Check to make sure your connection from PC is being shared and used as gateway ect in your main status and thats it. Connect to router via wireless or ethernet (faster). DMZ basically creates a port server for the xbox-router any port the xbox wants open nzb opens it (was what I understood). If your still not getting your xbox to say Open NAT make sure ips match router DMZ and xbox (dhcp crap messes it up sometimes), start opening ports on the router, pc and android for xbox you can get list of ports for COD via google and portforward on android and complete firewall bypass on pc can help too. You can achieve OPEN by simply getting all ports necessary but DMZ method much easier. As far as I know you need a DMZ capable Router you cannot WiFi tether to xbox and get open or any other way without a router to my knowledge.
Click to expand...
Click to collapse
Thanks, I appreciate it! One question, is it possible without a router? Just bridging PC to Xbox?
When you're using this kind of a method, your phone provider is the NAT. You can't really get around it because they control it. Not you.
However many phone providers will let you pay extra for a public IP address and then you'll have an open NAT.
I've tried just about every possible method to grt open NAT through my phone with the wifi tether app.. PC has wireless adapter connected to my phone.. Etherney cable from LAN port to the routers modem plug.. Ethernet cable from router to ps3.. I can't login to my router to change any of the settings for some reason.. I have a Netgear and my web browser keeps saying it can't find the page..
Sent from my SPH-D710 using Tapatalk 2

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!

LTE->USB OTG-> USB Ethernet Adapter->Router WAN ???

I've seen articles/posts about reverse tethering (getting internet from PC to phone) and obviously regular Bluetooth and Wi-Fi tethering...
Say my home ISP service is down for some reason and I want to use some of my mobile data in the house temporarily.
Is there a way to get tethering setup so internet from mobile phone LTE gets sent out the USB, through a micro-USB OTG adapter, to a USB-to-Ethernet adapter, and then run an Ethernet cable from the adapter to my WAN port on my wireless router? Then all my wired and wireless devices can get internet access through the router so it handles DHCP and all that and the phone just tethers to the WEB interface of the router.
I know I can do the reverse of this, hard-wire Ethernet into my phone if for some reason I didn't have Wi-Fi or cellular connections. How about the opposite?
My phone is unlocked, rooted, and I'm pretty decent at editing config files if necessary!
More research shows maybe I'm better off using usb tethering to a usb port on the router and running dd-wrt. Or setting up router add a client bridge and using Wi-Fi tether instead of cable connection.
http://forum.xda-developers.com/showthread.php?t=2136816
Hmm...

Ethernet to LTE/Data internet sharing

Hello.
I got this USB-C dongle with an ethernet connector which I just tried and gets a LAN IP through DHCP and can even browse while on Airplane mode. Now, I would like to use that ethernet to share internet to a LAN network using the phone as a router.
Why? I would like to try doing some load balancing and other crazy stuff with my appliance firewall using the phone's ethernet as wan2.
Has anyone attempted this? I've googled with no luck.
Thanks!

Categories

Resources