[Q] Anyone been able to ssh remotely (not with wifi) to their Thunderbolt? - Thunderbolt Q&A, Help & Troubleshooting

ssh from your computer over wifi is easy, but doing it over LTE seems to be problematic if not impossible (with the phone acting as the server). It doesn't look like we're given a public ipv4 address and they're just doing an NAT magic to translate it into an ipv4 addy on their end, but it doesnt necessarily link back to you always (if you check your ip over a browser).
With my home connection being SOL as far as having ipv6 thanks to craptactular att "we dont need no ipv6 for our customers," I don't see any possible method to reach the phone.
Blackberries had a static ipv4 (when I had one) but I know that's a dying thing for new phones with ipv4's days numbered.
I know there's other solutions (like vpn), but obviously that's not the same.

i have not had any luck either and that makes sense now cuz i remember having issues with trying to run a server on my phone . damn this is annoying.
I cant get ANY data to work with the exception of once and that was only searching google.com but no other website would work... any ideas anyone?

ddarvish said:
i have not had any luck either and that makes sense now cuz i remember having issues with trying to run a server on my phone . damn this is annoying.
I cant get ANY data to work with the exception of once and that was only searching google.com but no other website would work... any ideas anyone?
Click to expand...
Click to collapse
Nope, not really. Probably could set up a vpn server on my VPS server and and vpn into that to get around the NAT though and do some work in iptables for routing. That was the only thing I could come up with.

Hi,
I know that it was stated that "ssh from your computer over wifi is easy," but this process is not immediately obviously to me. I have succeeded in sshing with the phone, but not into it. Can someone explain how to ssh into the phone (from a computer with wifi that the phone is also connected into)?
Thank you,
Michael

mcoughlin said:
Hi,
I know that it was stated that "ssh from your computer over wifi is easy," but this process is not immediately obviously to me. I have succeeded in sshing with the phone, but not into it. Can someone explain how to ssh into the phone (from a computer with wifi that the phone is also connected into)?
Thank you,
Michael
Click to expand...
Click to collapse
You need an ssh server on your phone. You can either use something like dropbear, which comes by default on most AOSP ROMs and you can figure out how to set it up by reading this or you can use something like sshdroid, which is a GUI app.

I'd be willing to bet that verizion simply blocking ports and not giving you a real ip
Sent from my ADR6400L using XDA App

movielover76 said:
I'd be willing to bet that verizion simply blocking ports and not giving you a real ip
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
Unless you're roaming, you're always behind NAT and an IP within verizon's network. No one is going to give you a real and static ipv4 address nowadays regardless of the mobile network, there just arent enough left. IPv6 however I do not know if it routes out or not, haven't tested yet and the only place that I have an ipv6 address is my remote server so it doesn't do that much good usability wise to me.

Thank you for the really helpful comment! Now for another silly question: imagine the case where you have your phone connected by USB to your computer. Is it still possible to "ssh" into it using one of the methods described above?

mcoughlin said:
Thank you for the really helpful comment! Now for another silly question: imagine the case where you have your phone connected by USB to your computer. Is it still possible to "ssh" into it using one of the methods described above?
Click to expand...
Click to collapse
if you have the usb cable connected, you could just use adb and type "adb shell"
Otherwise, I don't think so because you aren't registering a network address via usb.

So once you are into your phone with adb, is it possible to run a program like ConnectBot to ssh out from the phone through your computer's adb shell?

mcoughlin said:
So once you are into your phone with adb, is it possible to run a program like ConnectBot to ssh out from the phone through your computer's adb shell?
Click to expand...
Click to collapse
Yes, if you mean ssh into your computer's sshd (ssh server).
ssh client (phone) → ssh server (computer)
or you can go the other way as well if you have an ssh server on your phone.

Related

[DEV] Other ways to enable the hotspot? or tethering w/out market apps? (w/out root)

i know modifying the services.jar is done when rooted but i have been messing with QPST pretty much all day and have found quite a few little tweaks that can be made. anyway, i noticed under multiple tabs there are options for tethering. when i get back, im going to back up all my settings and then change some things to see what i can come up with.
can anyone with and intimate knowledge of QPST and our phones chime in here? is there anyway at least the wired tethering can be modified w/ QPST to be unlocked? just a thought because the market apps have to do something not root related.
I don't know about actual tethering (which gives your PC an IP address), but I've seen a lot of posts on XDA and other forums on how to browse the web using a proxy setup. I've been doing this for the last few days that I've owned the phone.
In essence, it involves:
1. Running a proxy server app on your phone. I use JADS internet sharer, in SOCKS mode. Proxoid is another HTTP proxy server
2. Connecting phone to the computer using USB
3. Putting the phone in HTC Sync mode (I couldn't get adb to work in charge only mode)
4. Doing adb port forwarding on your computer: adb forward tcp:12345 tcp:1080
5. Configuring firefox to use the SOCKS v5 proxy localhost:12345 (or HTTP/HTTPS proxy if you run proxoid)
6. Configuring the network.proxy.socks_remote_dns custom property value to "true" in firefox's advanced configuration (type about:config in the address bar, and type "dns" in the filter textbox)
After this, I can browse the internet all I want. And that's really all I need at this time. I'd like to have the computer route all internet through this proxy server, but I'm going to look into it later.
I suspect the market apps are doing something VERY similar. They all have a client component you have to install on your PC, maybe the client is a "dummy" network interface that routes all traffic through a similar port forwarding setup.
ProcessorHog said:
I don't know about actual tethering (which gives your PC an IP address), but I've seen a lot of posts on XDA and other forums on how to browse the web using a proxy setup. I've been doing this for the last few days that I've owned the phone.
In essence, it involves:
1. Running a proxy server app on your phone. I use JADS internet sharer, in SOCKS mode. Proxoid is another HTTP proxy server
2. Connecting phone to the computer using USB
3. Putting the phone in HTC Sync mode (I couldn't get adb to work in charge only mode)
4. Doing adb port forwarding on your computer: adb forward tcp:12345 tcp:1080
5. Configuring firefox to use the SOCKS v5 proxy localhost:12345 (or HTTP/HTTPS proxy if you run proxoid)
6. Configuring the network.proxy.socks_remote_dns custom property value to "true" in firefox's advanced configuration (type about:config in the address bar, and type "dns" in the filter textbox)
After this, I can browse the internet all I want. And that's really all I need at this time. I'd like to have the computer route all internet through this proxy server, but I'm going to look into it later.
I suspect the market apps are doing something VERY similar. They all have a client component you have to install on your PC, maybe the client is a "dummy" network interface that routes all traffic through a similar port forwarding setup.
Click to expand...
Click to collapse
does easytether have a pc client? never tried it so i really dont know but i think your right because in the free version of easytether its web ports only and the paid version, all ports are working (gaming, messaging, etc....).
I've tried the Easytether paid version and it works great.
ydoucare said:
I've tried the Easytether paid version and it works great.
Click to expand...
Click to collapse
i've used this before.. good stuff
ydoucare said:
I've tried the Easytether paid version and it works great.
Click to expand...
Click to collapse
never said it didnt work. that's not the point of this thread.
ydoucare said:
I've tried the Easytether paid version and it works great.
Click to expand...
Click to collapse
Over wifi? Also, will this work for computers that can only join a secure network? (not adhoc) [if wifi is avail]
I only need to tether when on a job and there network is down or something and I may need to get on my laptop for a brief amount of time would this easytether work for me.
this should be in Q&A or general. you are not developing anything with your op so it does not belong here please pm a mod to move
Or merge with thread WIP DEV hotspot unlock?
BANG! from my shooter...

[Q] stock vpn connection bug?

Has anyone successfully made a VPN connection with their rezound? I am trying to connect to a VPN connection known to be working and it says its connected, but I am unable to get internet traffic to go through. (I.e. when I am connected to the VPN, Any app that uses data is unable to find a connection to the internet.) I know it's not on the VPN server side because I am able to connect and get data with another phone.
Any ideas? Thanks in advance!!!
BUMP. no one has tried or can try out VPN for me?
Bump. Not to sound whiney, and but I find it sad that my post can be up for so long without even a single reply. There is a ton of good info in these forums and I'm patiently waiting for s-off just like the average member, but the issue of the vpn hasn't even been looked into by anyone else? I guess my question to any mods would be "what do I have to do to get some attention to an issue I'm having? "
nlitend1 said:
Bump. Not to sound whiney, and but I find it sad that my post can be up for so long without even a single reply. There is a ton of good info in these forums and I'm patiently waiting for s-off just like the average member, but the issue of the vpn hasn't even been looked into by anyone else? I guess my question to any mods would be "what do I have to do to get some attention to an issue I'm having? "
Click to expand...
Click to collapse
you are so active on the forums, I can't believe your question hasn't been answered yet...
sorry, don't have anything to hide, so don't use vpn.
Why would you need to use a VPN on a phone lol? If you're using free wireless tethering I really doubt that it'll mask it for you. Verizon would be like zomg in Russia wireless tethering steals you!
zetsumeikuro said:
Why would you need to use a VPN on a phone lol? If you're using free wireless tethering I really doubt that it'll mask it for you. Verizon would be like zomg in Russia wireless tethering steals you!
Click to expand...
Click to collapse
First of all, thank you both so much for the replies.
I'm not sure that I follow that last sentence, but but to answer the first question.... I want to use the vpn to encrypt my data. I don't use tethering that often, so I don't want to pay for the hotspot fee..... And I don't want to risk Verizon messing with or possibly closing my account or charging me a fee.... So I'd like to run my tethering data though my personal vpn.
I am able to use the stock VPN to connect to my networks. I have about 25 different VPN connections and my VPN connections are the L2TP/IPSEC PSK type. I can mount shares, as well as using remote control programs.
I would look at the logs of the device that you are trying to connect to, maybe that might give you some hints as to the issue. One thing I did find it that my device does not see the DNS server for some reason (even though it is specified), so therefore I have to use IP addresses to connect to anything.
This probably doesn't help you too much, but I did want to reply to let you know that I have the stock VPN working.
Good luck!
Flipdog said:
I am able to use the stock VPN to connect to my networks. I have about 25 different VPN connections and my VPN connections are the L2TP/IPSEC PSK type. I can mount shares, as well as using remote control programs.
I would look at the logs of the device that you are trying to connect to, maybe that might give you some hints as to the issue. One thing I did find it that my device does not see the DNS server for some reason (even though it is specified), so therefore I have to use IP addresses to connect to anything.
This probably doesn't help you too much, but I did want to reply to let you know that I have the stock VPN working.
Good luck!
Click to expand...
Click to collapse
Wow! Thank you! It's so good to know that someone has a version of the stock vpn working. Mine are the PPTP type. I wonder if this phone has issues with that setup. Could you possibly test a PPTP connection?
Sorry, I'd love to be able to help you test but all of the device's that I connect to use only the L2TP/IPSEC PSK VPN. Good luck solving your problem and have a happy holiday!
Well I just wanted to update this thread. It looks like PPTP VPN is broken in stock android and therefore it's not specific to the rezound. It looks like it can be fixed by developers (and from what I've read) it's pretty common for it to be fixed in non-stock roms. The lack of internet/browsing is caused by a bug in the MPPE (Microsoft Point-to-Point Encryption) implementation. The following article explains it pretty well:
http://www.securitykiss.com/resources/articles/android_vpn_bug/index.php
This thread discusses some workarounds that were a bit over my head:
http://code.google.com/p/android/issues/detail?id=4706
IPsec connections are not affected....and it looks like MPPE connections have been fixed in ICS. If any developers could take a look at the above thread and explain in more basic english how to "fix" the connections that would be greatly appreciated. If not, i guess i'll have to wait and hope ICS fixes it.
nlitend1 said:
First of all, thank you both so much for the replies.
I'm not sure that I follow that last sentence, but but to answer the first question.... I want to use the vpn to encrypt my data. I don't use tethering that often, so I don't want to pay for the hotspot fee..... And I don't want to risk Verizon messing with or possibly closing my account or charging me a fee.... So I'd like to run my tethering data though my personal vpn.
Click to expand...
Click to collapse
I was just joking around w/ the last sentence. Hope you figured it out!
I have been able to use Raptor VPN on my Rezound. Just Google it, it's free
Sent using my HTC Rezound
fjl307 said:
I have been able to use Raptor VPN on my Rezound. Just Google it, it's free
Sent using my HTC Rezound
Click to expand...
Click to collapse
Very interesting! Thank you! Have you used the PPTP or L2TP version? Was this just to setup the vpn server and then you connect to it with the stock vpn client?
I'm using the L2TP version
Sent using my HTC Rezound
I'm having the same issues as you are. I know I'm replying a month late, but I didn't get my phone setup until almost Dec 30th and have been fighting my corp VPN ever since.
Once in a while I can get ping to work from Better Android Terminal, but that is always short lived and I can never get anything to work from other apps.
I'm glad you found the issue. I took a look at logcat and it is definitely a kernel issue. When the connection starts, I get the message "couldn't set tty to ppp discipline".

[Q] reverse tether? is it possible?

I'm basically on a per-MB data plan, and my Fascinate's wifi receiver is horrible, even compared to my iPod Touch 4.
Right now I am getting wifi through a high-gain directional usb adapter. I can share the connection to my iPod through an AdHoc network, and Firestarter's internet sharing feature [on Ubuntu].
But since the Fascinate doesn't recognize AdHoc, I cannot find a way to reverse tether my phone, that is, use my Laptop's connection on my phone.
Is it possible?
I tried making a Hotspot with my fascinate, connecting to it with my laptop, so my laptop was something [I forget the exact numbers] like 10.42.43.114, and my phone was 10.42.43.120. I tried Proxy Droid, telling it to use 10.42.43.120 SOCKS5 proxy (I used ssh localhost -D1111 on my laptop for socks5 proxy), and tried loading a page. I got nothing. Then I tried setting up a SQUID http proxy, and this time I got a "Squid access denied" message, so it was loading from my laptop.
but I tried this again later, and could not even get squid to load anything after that.
Is there a way to do this easily?
Maybe you can try couple possible solutions from here?
Hyper_Warp said:
Maybe you can try couple possible solutions from here?
Click to expand...
Click to collapse
I can't get the connections bridged in linux. I tried following some steps someone posted somewhere, but it gave me an error, saying my wifi [wlan1] couldn't be added to the bridge [br0]
You can try this: http://www.maryfi.com/
Saw it on lifehacker
nufan said:
You can try this: http://www.maryfi.com/
Saw it on lifehacker
Click to expand...
Click to collapse
Looks fine.. except I can't be rebooting into Windows 7 all the time..
I have Ubuntu, as I stated in my original post
There is a new app called ReverseTether that allows you to do just that and it doesn't require any additional software or tech savviness, and it's very straight forward and simple to use.
Check this out:
Benn awhile since I used bridge utils but I seem to recall similar errors when I had an IP assigned to all the interfaces. I had to have the two interfaces without ips and assign the ip to br0 instead. If I remember correctly.

SSH server

I did some searching, and was unable to find a working ssh SERVER for the rezound. Has anyone done this before? I am interested in setting up a proxy tunnel through my phone. I tried SSHDroid but it doesn't seem to be working for me.
Thanks
ES file explorer has this built in. I haven't really tried it, but it may be worth checking into.
I have ES explorer, but I don't see an ssh server anywhere
trud9340 said:
I have ES explorer, but I don't see an ssh server anywhere
Click to expand...
Click to collapse
That's because I was having a momentary lapse of reason. I was thinking FTP and steered you wrong. Sorry man.
Look for the app that installs linux on your phone then install an ssh server from within the linux chroot. I forget what the app name is because I'm in the middle of flashing roms
What exactly does the Linux Installer do? Create a virtual linux instance, running under the current ROM?
it sets up a chroot environment and installs a full blown Linux OS in your phone (I think the only two choices are Debian and Ubuntu ATM) minus the X Server so it's only the CLI. It may be too convoluted for it to actually work but it's worth a try.
What your looking for is sshdroid its on the play store. I also believe you need to be rooted for it to function
seeker160 said:
What your looking for is sshdroid its on the play store. I also believe you need to be rooted for it to function
Click to expand...
Click to collapse
The OP tried that....
trud9340 said:
I tried SSHDroid but it doesn't seem to be working for me.
Click to expand...
Click to collapse
I gave it a shot and it didn't work for me either. I'm rooted. It gave some quick error that looked like a invalid options screen, but it went by very fast.
Sshdroid seems to start successfully, but when I attempt to ping or ssh to the provided ip address, it doesn't respond.
Sent from my ADR6425LVW using XDA
With your phone browser, try: http://www.whatismyip.com/ and see if that matches the same IP you think it is.
I got nothing but an error when I tried it. Came to a screen that said revert, .... and adfree. Adfree took you to the market pro version to buy. I think the middle option was cancel. It had an options error displayed quickly on the screen but it didn't stay long.
Were you on wifi or 4g? I only had it work on wifi. The 4g ip4 address isn't publicly routable. I heard the ipv6 address is but i couldn't get that one working either.(Might of been the network I was trying from though or the program I was using for ssh)
Forgot about that. I remember trying to do this with a 4G Hotspot. Even though you have an outside IP, traffic is not allowed back in. For a while when I got it, you couldn't even do a VPN connection with it... kind of useless for a business tool, but they ended up fixing that.
I tried both on WiFi and 4G. They both give me different ips, and for both, I tried the suggested IP, and also the IP thats provided by whatismyip.com.
Seems I'm out of luck. I would have thought that with root, something like this would have been done by some nerd (like me) by now.
trud9340 said:
I would have thought that with root, something like this would have been done by some nerd (like me) by now.
Click to expand...
Click to collapse
it is not the phone, it is the network. Wifi should work. VNC server works.
Via Rezound using XDA Premium
As someone else mentioned you can't connect to your phone while you're on Verizon's network, because IIRC they're actually "private" IPs but on a huge (NAT'd) network. So you can only really make connections to your Rezound via wifi or somehow setup a reverse connection where the phone initiates the connect. If I understand everything correctly, the problem is you're essentially behind Verizon's firewall which only allows incoming connections from certain IPs or one that were originating from the phone itself.
QuickSSHd works fine for me over WiFi.
Its widget shows current IP, which is convenient.
I'm rooted, of course.
when running on WiFi, you need to poke a hole in your routers firewall to let the ssh traffic into the ip used by your phone.
otherwise, when on the same network as the phone, use the internal ip address of the phone... go to WiFiSettings-> Advanced-> and read the line under 'IP address' should say like 192.168.x.x or 10.x.x.x or 172.
trud9340 said:
I tried both on WiFi and 4G. They both give me different ips, and for both, I tried the suggested IP, and also the IP thats provided by whatismyip.com.
Seems I'm out of luck. I would have thought that with root, something like this would have been done by some nerd (like me) by now.
Click to expand...
Click to collapse
These "apps" are just wrappers for dropbear SSH Server, which is free. You might be able to build it yourself, but, frankly, dropbear sucks.
Try the Linux CHROOT environment. You'll get OpenSSH which is better than the dropbear SSH server that these "apps" use.
Not only that, but the OpenSSH route allows you to use SSHFS, which will allow you to mount your rezound over wifi as a hard drive wirelessly.
So, man up, and choose Linux ;-)
I'll dig up some thinks for you in a moment.
Tried lildebi and the ubuntu methods and neither works as directed. Going to take a closer look later.
Lildebi fails with execution when it tries to create the file system and the ubuntu process uses an image that is too large for vfat. Going to try to cook an ubuntu filesystem that is 1.5gb and see if I can move on from there.

Running 3G and WiFi connections simultaneously

Hello to all.
I was trying to start this thread in Android Software and Hacking General, but got a warning about not having enough posts to submit a thread there, so I'm going to try here.
I have a Samsung Galaxy S II phone with the newest Android version. My goal is to modify the system so that 3G and WiFi are able to run together, side-by-side, simultaneously without 3G being turned off. Now, every time I connect to a WLAN, 3G cuts.
[OK, the spam police won't let me post outside links; Google Mobisocial 3G Wifi Stanford to find the article I'm talking about.]
MobiSocial News wrote about a hack that modifies ConnectivityService.java in a rather crude way, but according to the author of that article, it works on a 2.x Android system. There's not much info about the hack, but it's at least something and sounds plausible.
I tried to follow the instructions; I downloaded newest Android source codes, modified ConnectivityService.java and built the kernel by following these instructions: [a link to source.android.com "Building the System"]. But unfortunately, make didn't produce a services.jar mentioned in the article.
---
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Every piece of information is valuable, so don't be afraid to post. Thanks!
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
I want to do the same with you
Cherilee said:
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
Click to expand...
Click to collapse
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Moonguy75 said:
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Click to expand...
Click to collapse
And why they say that it works?
Cherilee said:
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Click to expand...
Click to collapse
It's possible with a rooted phone.
cboursinos said:
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
Click to expand...
Click to collapse
Read here:
http://forum.xda-developers.com/showthread.php?t=2197776
Moonguy75 said:
No it is not possible.
Click to expand...
Click to collapse
Actually it is, I found this thread that describes how to do it on an optimus G phone, and based on that I was able to do in on vanilla android 4.3 as well (my rooted nexus 4).
You need to put a couple of scripts together, since you need a series of shell commands for turning this on and off, I recommend the wonderful SH Script Runner for this.
Here is what I did on my Nexus 4. It works perfectly but note that you don't actually see the wifi icon turning on, but if you run "netcfg | grep UP" you will see that the wlan0 interface is up and running (as well as the rmnet_usb0 mobile data interface, both of them will be up and will have the expected IP addresses) and you can access your local LAN while your mobile data 3g/4g whatever provides your default route to the outside world.
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Sent from my MI 2 using Tapatalk
wlh03212 said:
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Click to expand...
Click to collapse
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
sordna said:
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
Click to expand...
Click to collapse
Hi I'm running on Miui v5 4.1.1
I did try the above commands. But I'm not sure about the ip route you mentioned in the coding x. X. X. X via y. Y. Y. Y.
The response of the script was permission denied. I am definitely rooted and I gave permission to SH script runner.
Sent from my MI 2 using Tapatalk
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
sordna said:
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
Click to expand...
Click to collapse
Thanks you for your reply. First of all my understanding of networking isn't anywhere basic . What i did with the xxx was replacing it with the internal ip assigned to me, aka 192.x.x.x
For the yyy, I replaced it with the ip of 3g connection. Not sure what I am doing here. Please guide me here (I know the su part which I an required to do in terminal)
And finally my goal. I have Seagate wireless plus and itself is a portable wifi hotspot to its own content. I am able to stream pictures music and video from the battery operated hardisk. I can bridge the connection of the portable hotspot to my home wifi gaining xs to the Internet.
However while I am connected to the Seagate wireless plus, I cannot connect to my 3g. That meaning I can't have Internet on the go which is a very big limitation.
Sent from my MI 2 using Tapatalk
Sent from my MI 2 using Tapatalk
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
sordna said:
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
Click to expand...
Click to collapse
# enable dual-networking:
............
............
.............
..........
...........
..............
..........
ip route add x.x.x.x via x.x.x.y # add any desired local route -------->( do i remove this row of code entirely? What do i do with this row of coding? Provide my default gateway? I'm not sure what's my default gateway or how i do find out my default gateway or how should i edit this coding to my default gateway.)
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well (In short if the i execute the above commands correctly with the correct default gateway of my 3G, the netcfg command should show my default gateway correctly? is my understanding correct?)
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
sordna said:
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
Click to expand...
Click to collapse
Thanks you much! Going to try out when I get home.
Sent from my MI 2 using Tapatalk
OK. Please hit the thanks buttons
sordna said:
OK. Please hit the thanks buttons
Click to expand...
Click to collapse
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
wlh03212 said:
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
Click to expand...
Click to collapse
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
sordna said:
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
Click to expand...
Click to collapse
Yes. I notice that the wifi switched off and then turns on again. Alright I do some research on my own! Thanks again.
Hope that I will get some breakthrough soon
Sent from my MI 2 using Tapatalk
Hi
I finally got it working. When I am connected to seagate wireless, I have to fiddle with the connection settings inside wifi settings. I assigned a static ip and assigned the gateway to 0.0.0.0
As for the ip, I set a different internal ip with the last digit increased by one. Example 172.25.0.2
Now I am connected to both 3G and LAN.
Sent from my iPhone using Tapatalk

Categories

Resources