Static IP on Android Devices

Chat about Linux in general
Post Reply
User avatar
lisabonne citadel
Level 3
Level 3
Posts: 126
Joined: Fri Oct 13, 2017 5:13 am

Static IP on Android Devices

Post by lisabonne citadel » Sat Nov 25, 2017 5:40 am

YOU NEED ROOT ACCESS
1 - install terminal emulator for android

2 - in terminal type su

3- disable ipv6, writing the following (this may be different on your device- you can see with your root file manager)
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

4 - disable root on ssh with your root file manager
on /etc/ssh/ssh_config add this entry
PermitRootLogin no

5 - check your MAC address in terminal
su
ip link show wlan0
copy with some pencil

6 - enable static ip with your root file manager
on /system/etc/dhcpcd and add this entry on dhcpcd.conf - replace xx with your mac

config host
option ip '(some ip just like 192.168.1.6)'
option mac 'XX:XX:XX:XX:XX:XX aa:bb:cc:dd:ee:ff'
option name 'myandroid'
save it and disable your wifi and enable it again
Last edited by lisabonne citadel on Sat Nov 25, 2017 10:08 am, edited 1 time in total.

User avatar
catweazel
Level 14
Level 14
Posts: 5447
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Static IP on Android Devices

Post by catweazel » Sat Nov 25, 2017 5:52 am

Alternatively, set a fixed IP on the router for the device MAC.

I think your post is irresponsible. People can brick their devices doing what you propose.
A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it. - Max Planck

User avatar
lisabonne citadel
Level 3
Level 3
Posts: 126
Joined: Fri Oct 13, 2017 5:13 am

Re: Static IP on Android Devices

Post by lisabonne citadel » Sat Nov 25, 2017 7:17 am

Now i have linux mint with root access typing this and I think its SECURE. :lol:


Setting your router, could be... but if is android its almost IMPOSSIBLE doing that in another place than your home and work :cry:

This measure is to surfing anonymous without worrying about ip interceptions just like DHCP connections. :wink:

Hoser Rob
Level 11
Level 11
Posts: 3836
Joined: Sat Dec 15, 2012 8:57 am

Re: Static IP on Android Devices

Post by Hoser Rob » Sat Nov 25, 2017 8:48 am

catweazel wrote:Alternatively, set a fixed IP on the router for the device MAC.

I think your post is irresponsible. People can brick their devices doing what you propose.
Agree 100%. There's a lot of tings like that here.

User avatar
lisabonne citadel
Level 3
Level 3
Posts: 126
Joined: Fri Oct 13, 2017 5:13 am

Re: Static IP on Android Devices

Post by lisabonne citadel » Sat Nov 25, 2017 9:56 am

Hoser Rob wrote:
catweazel wrote:Alternatively, set a fixed IP on the router for the device MAC.

I think your post is irresponsible. People can brick their devices doing what you propose.
Agree 100%. There's a lot of tings like that here.
Can you really specify what is WRONG?

because everyone can learn how to disable ipv6 for hiding all hardware information...
because is revertable changing 1 by zero

because disabling ssh root access no one can entered remotely... yes that is correct... no one since android doesnt have RPC. you can either revert deleting the adding entry.

Let me see, what is really WRONG?

User avatar
Portreve
Level 6
Level 6
Posts: 1065
Joined: Mon Apr 18, 2011 12:03 am
Location: Florida
Contact:

Re: Static IP on Android Devices

Post by Portreve » Sat Nov 25, 2017 12:08 pm

Every time you restart an Android phone, it changes its reported MAC ID. I'm not sure exactly when they implemented this behavior, but I remember it being there on my Nexus 4.

I used to have a static IP address set up for my phone, along with everything else in my home, but that completely went out the window because I no longer had a static MAC addy for the thing.
Everything is in hand. With this tapestry... and with patience, there is nothing one cannot achieve.

No hamsters were harmed in the authoring of this post.

User avatar
phd21
Level 16
Level 16
Posts: 6195
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Static IP on Android Devices

Post by phd21 » Sat Nov 25, 2017 12:18 pm

Hi "lisabonne citadel",

FYI: You do not need to install a "terminal emulator" to do this.
Static IP Address on Android
https://it.uoregon.edu/node/3559

Go to settings, tap and hold on the network you wish to adjust, click modify network.
Image

Mark the show advanced options check box.
Under IP Settings, change it from DCHP to Static.
Image
When using static IP addresses on home and other private networks, they should be chosen from within the standard private IP address ranges listed:

10.0.0.0 through 10.255.255.255
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255
Now enter the IP address. This step is specific to each network. Ex: 192.168.1.128
Then enter the gateway, which is the base ip address of your network. (based on previous example): 192.168.1.1
Image

Tap save and let the network reconnect.
Generic search results on "Static IP on Android Devices"
https://www.google.com/search?client=op ... 8&oe=UTF-8


Hope this helps ...
Phd21: Mint KDE 17.3 & 18.3, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
lisabonne citadel
Level 3
Level 3
Posts: 126
Joined: Fri Oct 13, 2017 5:13 am

Re: Static IP on Android Devices

Post by lisabonne citadel » Sat Nov 25, 2017 12:47 pm

Portreve wrote:Every time you restart an Android phone, it changes its reported MAC ID. I'm not sure exactly when they implemented this behavior, but I remember it being there on my Nexus 4.

I used to have a static IP address set up for my phone, along with everything else in my home, but that completely went out the window because I no longer had a static MAC addy for the thing.
I tested with some device this and works as great.

User avatar
lisabonne citadel
Level 3
Level 3
Posts: 126
Joined: Fri Oct 13, 2017 5:13 am

Re: Static IP on Android Devices

Post by lisabonne citadel » Sat Nov 25, 2017 12:53 pm

phd21 wrote:Hi "lisabonne citadel",

FYI: You do not need to install a "terminal emulator" to do this.
Static IP Address on Android
https://it.uoregon.edu/node/3559

Go to settings, tap and hold on the network you wish to adjust, click modify network.
Image

Mark the show advanced options check box.
Under IP Settings, change it from DCHP to Static.
Image
When using static IP addresses on home and other private networks, they should be chosen from within the standard private IP address ranges listed:

10.0.0.0 through 10.255.255.255
172.16.0.0 through 172.31.255.255
192.168.0.0 through 192.168.255.255
Now enter the IP address. This step is specific to each network. Ex: 192.168.1.128
Then enter the gateway, which is the base ip address of your network. (based on previous example): 192.168.1.1
Image

Tap save and let the network reconnect.
Generic search results on "Static IP on Android Devices"
https://www.google.com/search?client=op ... 8&oe=UTF-8


Hope this helps ...

Thank you for your help... I tested first the way you presented but is not working.

The reason why i post this is because now-a-days is extremely hard to have good information to apply static ip or disable DHCP. I dont need to say is completely ILLEGAL THE EXTRACTION of private data such hardware id, IMEI or Private media and documents. AND NOW we all living into this. Local authorities may have some guilty because dont even cares. I referring europe legislation upon USA interests of control all Bandwith DATA.

Post Reply

Return to “Chat about Linux”