[Q] adding a dns host record for an android device - General Questions and Answers

I'm running android-x86 in vbox on a Windows network in bridged mode. The device and all other computers are on the same network - 192.168.2.x. I have a router performing dhcp service and giving out the dns server ip address. A Windows 2008 server provides the dns services.
The android device can ping and nslookup all the other machines on the network. The other machines (all windows) can connect to the android device using its ip address.
I'd like to have a host record at the dns server so that the other computers on the network can connect to the android device using its name - "android-1", for instance, rather than 192.168.2.40.
Can anyone tell me how to make this happen?
Thanks.
Will

Related

How to open ports?

Hello,
I installed debian on the JF 1.5 I'm running on my phone, then I installed (in Debian, of course) OpenSSH Server.
Now, when the phone is connected to my LAN via Wifi, I can SSH it to its IP address even from my PC, and login to Debian... like to a real computer
I'd like to open inbound connections to port 22 on Android, to allow me connect with SSH also when it's on 3G network, using the IP that was assigned by mobile carrier. How I can do it?
Thanks in advance!
I don't think open port on phone do anything.
the blocking is on your operator network. they have firewall too.
Maybe my operator doesn't? I'm using Tre (Italy). What I can do to test it?
Up Up, please
but most mobile operators use private address + proxy scheme. how could you bypass that? (even if the client is also in the same mobile network, your carrier is very likely to implement subnet isolation for security reasons.)

Proxy PC Web Sessions Through Phone/SSH/Remote HTTP via USB

Synopsis:
Need to bypass corporate web proxy for unfiltered Internet access. Google Chrome is the preferred and tested browser, but Firefox should work as well. Corporate environment utilizes an automated global proxy setting, which must be bypassed using run-time arguments. Since I have a Squid proxy running at home on my cable connection, all I need to do is establish a port-forwarding tunnel from my phone to my house, then another from my laptop to my phone. This will allow me to browse the web and proxy any traffic through my phone to my proxy server at home, around our corporate proxy and firewall. The phone utilizes a DSL connection typically used for testing and other non-business traffic and is isolated from the corporate LAN.
Requirements:
A Web Proxy (Squid instance or other third-party available)
Atrix 2 Rooted (others not tested)
SSHDroid from Google Play
BusyBox (with ssh binary)
Google Chrome or Firefox
Putty SSH Client for Windows or other SSH client software AND a familiarization with SSH tunneling.
Procedure
On the Atrix 2, be sure 'Motorola Phone Portal' mode is configured for the USB connection. This will tell the phone to assign an IP address to the USB interface of the phone. In my case, it is 192.168.16.2. Once that is done, connect your phone to your PC via the USB cable. This may auto-launch IE on your desktop to your phone to the web portal on port 8080 and is not necessary.
On the Atrix 2, launch SSHDroid to enable inbound SSH connections. No special settings were configured in that app for any of this to work.
On your PC, manipulate your Chrome shortcut to use different proxy settings than the default. By default Chrome utilizes the Internet Settings on the PC, so this is necessary if you already have a proxy defined at the OS level. To do this, you must create a new shortcut to Chrome, then right-click on that shortcut, go to properties, and change the 'Target' field to include this information:
--proxy-server="localhost:3128" (don't forget the quotes)
Be sure to use this shortcut to launch Chrome or you will continue to use the OS-level Internet Settings.
Now, launch the Putty SSH client and create a new SSH session to your Android device. Enter the appropriate connection information, and under the Connection/SSH/tunnel section, define the port forward information for the web proxy. In my case I set it to port 3128 forwarding to 192.168.16.2:3128. Save this session. This will tell your PC when the SSH session is established to set up local TCP port 3128 to listen for requests, then forward them to the Android phone across the USB connection on the same port.
Try to connect to your SSH server on your phone. By default, the username is 'root' and password is 'admin' for SSHdroid. You should now be successfully logged into your phone.
In the Putty SSH session on your phone, you will now have to launch a command-line SSH session where you will establish the real tunnel to the real proxy server. Enter 'ssh <REMOTE SSH USERNAME>@<REMOTE SSH HOST> -L <IP OR HOSTNAME OF PROXY>:<PROXYPORT>:<USB NETWORK IP ADDRESS>:<LOCAL PROXY PORT>' (without quotes) to establish the SSH tunnel. Here is what my connection (sanitized) looks like. You can also run 'ssh -?' to get an idea of command-line options for the ssh binary.
ssh [email protected] -L 192.168.1.1:3128:192.168.16.2:3128
This will set your phone to listen on TCP port 3128 on the 192.168.16.2 interface and forward any requests to 192.168.1.1 on the same port. It is important to specify the USB interface as by default it will only set up connections on the localhost (127.0.0.1) interface, which won't accept connections from other remote hosts.
Finally, launch Chrome using the shortcut you created and you should now be sending all web traffic out the USB interface and through your phone to your remote proxy server. You can verify this by connecting to a resource such as your home Internet router on the LAN interface to verify. If you are running Squid at home, you should also be able to view your /var/log/squid/access.log and see your requests.
I have not tested remote web proxies or other methods, but in principle it should work.
Feedback and ideas for improvement are welcome!
I just USB tether and use Tunnelier (because putty does not have auto reconnect) and Proxifier (so I don't have to set the proxy settings in each application I want proxied)

[Q] vpn can connect but no internet and local lan

Hi, I have a samsung galaxy note 10.1 N8000. On my local network I have a synology diskstation DS213j which can run a vpn server L2TP/IPSec or openvpn.
On my samsung I have the latest official firmware.
L2TP/IPSec server DS213j is working fine with my ubuntu 11.10 notebook. I didn't try openvpn yet, but I guess I get that working too.
On my samsung I can connect nicely to L2TP/IPSec server (with build in android vpn client) or the openvpn server (with Openvpn for android app).
However I cannot access internet or my local lan. Although I can ping my local lan addresses. When I open ie the url to my webinterface of the local lan it tries to connect to it. It sometimes even manage to display the login screen.
I guess my routing on the tablet is wrong. Routing is set to automatic, only dns servers has been filled in manually, because they didn't get pushed right by the openvpn server on my synology. Notice that I don't have this problem on my ubuntu notebook.
Did someone manage to succesfully setup a vpn connection using L2TP/IPSec or openvpn?
If so I must take another look at the vpn servers on my synology, else I think I need to get root access to my tablet to manipulate the routing table.
BTW the goal is to rout all the traffic through the vpn expecially the internet. I need to access the internet through my home IP so I can use the live TV app from my cable/internet provider when I am on the road.
divx118
divx118 said:
Hi, I have a samsung galaxy note 10.1 N8000. On my local network I have a synology diskstation DS213j which can run a vpn server L2TP/IPSec or openvpn.
On my samsung I have the latest official firmware.
L2TP/IPSec server DS213j is working fine with my ubuntu 11.10 notebook. I didn't try openvpn yet, but I guess I get that working too.
On my samsung I can connect nicely to L2TP/IPSec server (with build in android vpn client) or the openvpn server (with Openvpn for android app).
However I cannot access internet or my local lan. Although I can ping my local lan addresses. When I open ie the url to my webinterface of the local lan it tries to connect to it. It sometimes even manage to display the login screen.
I guess my routing on the tablet is wrong. Routing is set to automatic, only dns servers has been filled in manually, because they didn't get pushed right by the openvpn server on my synology. Notice that I don't have this problem on my ubuntu notebook.
Did someone manage to succesfully setup a vpn connection using L2TP/IPSec or openvpn?
If so I must take another look at the vpn servers on my synology, else I think I need to get root access to my tablet to manipulate the routing table.
BTW the goal is to rout all the traffic through the vpn expecially the internet. I need to access the internet through my home IP so I can use the live TV app from my cable/internet provider when I am on the road.
divx118
Click to expand...
Click to collapse
Solved with the official release of DSM 4.3 beta and vpn server update of my synology. As I expected not all the routes were pushed by the server. dns servers I still have to ad them manually.

A weird restriction to access internet from wifi

Ask Question
I had a small quarrel with my stepfather, and then he didn’t let me access the home internet. When I try to connect to our home wifi normally, it says "obtaining ip address" and loops for minutes until it says "failed to obtain ip address." But when I try to connect by setting static ip from my phone, it connects immediately but says " no internet." I assumed he might have blacklisted me, but I am unable to connect even my laptop and other phones. Suspecting that my stepfather had enabled whitelist or MAC filtering, I tried to spoof MAC address using kali linux, but I couldn't connect to the wifi with spoofed MAC. I need internet but my stepfather won't listen to me. Since he is not in home right now and won't return for a month, I don't have a connected device to access the setup page and see the settings of our Digicom ( DG-M342T) router. I am also unable to physically access the router but I have the password( Authentication type - WEP). How do I fix this? I would really appreciate your help.
You could download the router's management app and then view the connected devices list on your phone. Check your router's setup guide to see which app you need to download.
jwoegerbauer said:
You could download the router's management app and then view the connected devices list on your phone. Check your router's setup guide to see which app you need to download.
Click to expand...
Click to collapse
I can't access the setup page by typing 192.168.10.1 in the url or from other Router management apps on the play store. It says " Can't reach the page." I also checked the guide where it says to open admin page by typing 192.168.10.1 on the browser , but there is no mention of any management apps.
Making changes to your router you’d need to know the IP address of the router. A list of wellknown router IPs here:
How to Find Your Router IP Address in 3 Steps | ExpressVPN
Learn what an IP address is, the differences between a local and public IP address, and how to find your router’s IP on Windows and Mac.
www.expressvpn.com
jwoegerbauer said:
Making changes to your router you’d need to know the IP address of the router. A list of wellknown router IPs here:
How to Find Your Router IP Address in 3 Steps | ExpressVPN
Learn what an IP address is, the differences between a local and public IP address, and how to find your router’s IP on Windows and Mac.
www.expressvpn.com
Click to expand...
Click to collapse
Thanks for your reply jwoegerbauer. As I mentioned earlier in my post, if I connect to wifi just by typing password, it loops "obtaining ip address" for long period, and therefore I have to set static ip address through the advance setting of wifi just to connect to it. My router's local ip address is 192.168.10.1 . I used to access the admin page before the restriction through this ip address. But now it says "Can't reach the page." The problem is about not being able to access internet and admin page after connecting to the router.
Clear your local DNS cache to make sure you have the recent version from your ISP for 192.168.10.1. For Windows machine, you can do this by going to Start > Command Prompt > Type ipconfig /flushdns and then hit Enter.
Assumed that router's IP really is 192.168.10.1 and it still doesn't work then maybe ISP is blocking it. You may try to use an alternate DNS service such as Cloudflare for example.
I flushed the dns in windows. Now I can connect to the wifi without setting statip ip (in windows), but I still can't access internet. If I try to open any website, it says "
Hmmm… can't reach this page" and then says "You are not connected." I installed cloudflare WARP in windows but it was no use , since it requires internet access to function.
These are the screenshots of my android to explain what exactly happens:
1. When I try to connect to wifi just by typing it's password (loops at "obtaining ip address")
2. Setting the static ip manually
3. Instantly connected after setting static ip
4. Connected but No internet
5. Can't access router setup page
Cloudflare Warp? Confused.
How to change DNS Server to Cloudflare is explained in detail here:
How To Change DNS To 1.1.1.1 [ CloudFlare ] In Windows 10 Laptop And PC Full Tutorial - TECHWIBE
Are you having a slow Internet speed and websites are taking too long to load with your Window 10 OS (laptop or PC). Then this guide will definitely help you
www.techwibe.com
I downloaded an application( Cloudflare WARP) form the cloudflare website linked below. I checked the website you linked and changed the DNS accordingly, but I still can't access internet. My android phone is not even connecting without static ip and I am tired of manually setting it and not being able to use internet.
Windows · Cloudflare WARP client docs
The Cloudflare WARP client allows individuals or organizations to have a faster, more secure and private experience online.
developers.cloudflare.com
No further ideas on my part.
jwoegerbauer said:
No further ideas on my part.
Click to expand...
Click to collapse
Well thanks for your help jwoegerbauer. Below is the screenshot of ipconfig command after flushing dns. It looks like I haven't been assigned an ip address, the subnet is different, and the gateway is blank. Do you have any idea what this means? What could be a valid ip adress to connect manually with static ip?

Assigning a static IP address to a phones hotspot

How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
normanscr said:
How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
Click to expand...
Click to collapse
I don't know the answer to your question directly as your situation is more complicated than is mine but I will try to help in so much as you can at least check what your current settings are.
My setup is only similar to yours in that I have apps (such as vysor & scrcpy) on Windows which are expecting a static IP address from my phone. However, where my setup differs from yours is I'm not using my phone as a hotspot - the router is assigning the IP addresses.
However, maybe what I've learned by randomizing my MAC address on each connection can help you - where I say maybe - as I your situation is using the phone as a hotspot and mine is passively accepting the IP address handed to the phone by the router.
In Android 11, the phone's Wi-Fi radio MAC address can be randomized per SSID, in which case the "address reservation" feature of most routers (often incorrectly called "static" IP addresses) won't work as intended. Worse, in Android 12, in Developer options, you can set a switch to randomize the Wi-Fi radio MAC address of the phone on every connection, regardless of the SSID.
Hence, you have to set the "static" IP address request in the phone itself, so that the router will respect that request for a static IP address.
(As an extra complexity, my SSID broadcast is hidden for privacy reasons (not for security - but privacy), which complicates things only a tiny bit as you have to turn off auto-reconnect for privacy.)
See the images below where maybe (but maybe not!) this information will help you track down why in your (hotspot) case, this static IP address requrest isn't being honored in your hotstpot setup.
normanscr said:
How can I assign a static IP address to my phones hotspot?
I use the hotspot on my Samsung M31 to connect my laptop running Windows 10 to the internet.
I also have Oracle's Virtual Box VM running a few test websites on the laptop on Ubuntu Server 22.04, which need a static IP address to access.
A few days back when I ran ipconfig at the Windows command prompt, it showed my wireless IP address as 192.168.166.135. Today, it show as 192.168.35.125. Meaning, all my sites are now broken. Is there a way to stop the hotspot from changing IP addresses?
Can someone please help?
Thanks,
Click to expand...
Click to collapse
Hi ,
if You are the lucky owner of a rooted phone you can try this:
How do I assign a permanent static IP address to hotspot in Android 10
I would like to assign a permanent static IP address to hotspot in Android 10 (Unofficial LineageOS 17.1 for Natrium by LuK1337, rooted with Magisk v20.3 and updated to Jan 11, 2020 build). Now whenever I turn on the hotspot, it assigns a...
forum.xda-developers.com
To assign a static IP address to your phone's hotspot:
Go to your phone's settings and find the hotspot or tethering settings.
Look for the option to set the IP address as "Static" or "Manual."
Enter the desired IP address, subnet mask, gateway, and DNS server information.
Save the settings and restart the hotspot.
For more details, you can check out https://1921681.mobi/192-168-100-1/. Hope this helps.

Categories

Resources