Port forwarding during usb tethering - Networking

How can i enable port forwarding during USB tethering? I know there are plenty of apps available for this. but i want to know is there any method available to perform this without installing an app and also without rooting the device? Target machine is running with Android 4.0.4, obviously not rooted. Thank you. P.S. I am trying to host a server on a PC connected to internet via Android device(USB tethered). I want my Android device to forward incoming TCP requests to particular port on the host machine.

It seems that's not possible to do port forwarding , unless the IP you get in your mobile connection is public , otherwise that becomes port triggering .
If your IP is public , you need to root your device , as its not possible to port forward out of root.

Related

[Q] Ways for sniffing packets from Android device.

Hello,
2 questions:
1) Is there a way for sniffing packets and debugging Android device without been "rooted" on the device?
2) Is there a way to sniff packets going out from an android device for example using vmware etc.
I want the filter to be specific for packets going out/trying to go out from an Android device/emulator.
right now i use tcpdump-arm and it works A-ok but i need to transfer the file to the device and also we rooted on the device.
I'm looking for something "less" intrusive.
if this is cannot be done pls write why.
thanks for any info related.
Br0k3n.

USB to LAN : Trendnet TUE2-ET100

Hi everybody,
Like video said, I'm noob !
I come from french and surely I'm not the better englishman of france, but I need you and I try to resolv my problem :=)
I have iconia a500, and go with it in holidays.
In my room, only RJ45 for internet, not WiFi... And my lady NEED internet ^^
That's why I try to use this device.
But, when I try to use it... It doesn't works :=/
I've seen that with taboonay it can works but it's rom for 3.2 and I am in 4.03...
Here my configuraiton :
CWM-based Recovery v5.5.0.X(thor2002rorev1.7)
Flexreaper 5.1
I use Trendnet TUE2-ET100 for network adaptator.
Have we one rom who can help me plz ?
I wait your help if it's possible.
Thank you.
Hi,
Nobody can help me ?
It would be probably better to just buy simplest access point out there and use it as a bridge between ethernet cable and wifi . You don't even need router functionality if the tablet will be the only device used. Just buy AP, configure it and just connect the cable to the RJ45 socket and voila.
You will probably need to connect AP to the PC with a cable to configure it but you need to do this only once. You need to configure the wifi name and security (preferably WPA2 PSK).
Hi,
Thank you for you answer !
Can we resolv problem without AP ?
The reason it's that we go to hotel and I bagage is full... xD
With USB analyser software (or application), I can see one information about my LAN adaptator... But it doesn't works when I try to use it.
I don't know if one other kernel can help me or if it's with other custom ROM...
Thank you very much for your help and your solution !
But if we have other possibility it's ok for moi :=)
Merci ;=)
Try the following:
Reboot the tablet (do not connect ethernet adapter yet)
In the terminal emulator display run dmesg (you can dump it with dmesg > /sdcard/dmesg1.txt for comparison)
Connect adapter
Run dmesg again and check for differences at the end (dump it with dmesg > /sdcard/dmesg2.txt and then compare both files).
This will tell if the kernel itself is recognizing the device properly as a networking device. If it doesn't then you need different kernel or kernel module for the current one for this device.
If the device is recognized and the proper kernel module is loaded and still no connectivity then one of the following can be true:
The device doesn't send request to acquire IP from DHCP (dhcp client in the rom not configured to support other devices than the built-in ones).
The device receives the IP, but the routing is not being set so the connection is not set as a default route.
The Android itself doesn't recognize the new interface and apps cannot start the connection using Android API (OS thinks it is offline).
Unfortunatelly I don't know much about how the networking on the application level works in Android and I don't have any USB ethernet adapter to do some tesing myself. I would need to ask some friends if they have one.
Very thanks to your help and sorry for this.
Below results dmesg after plug usb adapter.
Usb 1-1: new high speed usb device number 2 using tegra-ehci
Usb...: new usb device found, idVendor=0b95, idProduct=2,
Usb... : new usb device strings: mfr=1, product=2, serialnumber=3
Usb... : product: ax88772
Usb... : manufacturer: asix elec. Corp.
Usb... : seriaonumber xxxxxx
We can see that android see usb device.
But, when i made <ifconfig>, i can see only the wlan0 interface, no eth0 or other...
Maybe i have to mount it ?
Thanks for your help.
No, you don't mount network devices .
It seems that the tablet is not loading any kernel module for this device. I've done some searching and this device requires usbnet and asix modules to be loaded. I have checked if I have those module in my a500 (running CM9) and I don't have any of them.
I think that you would need to build your own kernel with proper modules to gain support for this adapter.
OMG xD
Build my own kernel
ok ok, let's go, I have already help my father to build house, I can did it !
...
Is it difficult to build kernel ? ^^
Are there any tutoriel for this ? or I need help of xda's members ?
Like other post, thank you for your interest and your help.
Sorry to make you spend time on my case
I'm sorry but my knowledge about compiling kernels is limited to PC Linux. I've never crosscompiled kernels for ARM architecture. It shouldn't be that hard. I think that you will need the Android SDK to do that. Search the dev forum.
I've been thinking about the module itself and you probably don't even need to compile whole kernel. You just need the kernel header files for the kernel you are using and you can probably compile the module alone and then just copy it to device. But you need to ask someone that is more knowledgable in this area than me.
hello, have you managed to build module for ICS or jellybean?
i have the same USB LAN adapter (i'm french too ^^)
Hope to have a positive reply!!!
thanks

Quallcomm Diag port access locally

All, I am looking to get access to the DMSS or DIAG port locally on android without a USB cable. Perhaps this is done via usb virtual devices or some other means. Anyone try this?
Once you get access, a lot of modifications could happen on android itself.

[Q] How do I use the Mojo for development with ADB?

I'm a game developer, and I just picked up the MOJO because I'd like to use it for development using ADB and the standard android tools. I bought a Male to Male USB cable to hook it up to my computer, but it doesn't seem like that works the same way that the micro USB works on Android phones and Ouya.
Has anyone gotten the Android working for development? If I had to guess, it sounds like you have to root it, then enable ADB over wifi? I found instructions to root it, but are there any instructions for getting ADB over WiFi (or the ethernet plug) running on it?
Thank you for your help!
I haven't debugged on my mojo yet, so I"m not 100%
Do you have developer options enabled?
I would look at Nvidia info, ie:
http://docs.nvidia.com/tegra/index.html#Getting_Started.html
The shield is simular.
https://developer.nvidia.com/getting-started-shield
You've got to ADB over the network. Find the assigned IP address of MOJO in the Settings>About MOJO>Status page.
Then go to your PC and type adb connect xxx.xxx.xxx.xxx into a command line to connect to MOJO - you can then ADB to your heart's content.

Android 5.1 lollipop VPN settings: how to add the Port 443 of the server?

Hello everybody.
How can I set the port for the built-in VPN client in Android 5.1.
I need a port 443 and the standard port for PPTP is 1723. Just specify the port through the colon (192.168.0.1:443) did not work, writes an error.
I found an old topic on Android 2.x http://forum.xda-developers.com/showthread.php?t=952394&page=2
There it was decided by a space: 192.168.0.1 443
In Android 5.1, this option is not working. Tell me how to set the port to connect?
Come on! Really in Android 5 is not possible to specify a port?
Need to tunnel traffic through port 443.
I think, you need adb and to make batch for forwarding
"cd c:\software\misc\reverse\
adb forward tcp:8022 tcp:443"
Sempiterna said:
I think, you need adb and to make batch for forwarding
"cd c:\software\misc\reverse\
adb forward tcp:8022 tcp:443"
Click to expand...
Click to collapse
As I understand it, this is only for rooted smartphones?

Categories

Resources