[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [Priority Support]

[SOLVED] DHCP on seperate Workstation for Android


#1

As detailed on the Other VM OS page, Android requires a DHCP server to run.

Since DHCP should not be trusted I’d like to move the DHCP server to a separate Whonix Workstation rather than run it on the Gateway.

I think HulaHoop has done this in the past. I would like to know how to make this work and what settings I would need to use.


#2

Actually what I did was find out that dhcp client on the gateway was exposed to workstations without iptables protection. It used to be that the GW needed to be dynamically assigned an IP on it’s internet facing NIC to be able to reach the outside world. We removed the package and configured the GW to work with static IPs.

You can try configuring Android to play ball with static IPs instead of having an entire setup to work around the DHCP requirement.


#3

Thanks. In that case I’m unsure what IP and mask I should use here:

su
ifconfif eth0 down
ifconfig eth0 [IP] netmask [masque] up

I tried

IP: 10.152.152.12
Mask: 255.255.192.0;

but it failed.


#4

try

10.152.152.11
255.255.255.0


#5

Getting closer with that IP and netmask.

I’m working on a Android VM in Virtualbox which previously worked with Whonix Gateway with DHCP. I’m launching another Gateway with the other shut to test this. So at least the Virtualbox routing seems to be working.

I can see in ifconfig that eth0 is updated with inet addr and mask etc. However if I try to ping 8.8.8.8 or what I believe should be configured as the gateway, 10.152.152.10, I get network is unreachable.

I have tried adding a gateway with:

route add default gw 10.152.152.10 dev eth0

but that doesn’t work since I can’t reach 10.152.152.10 anyway.

Any ideas on how to proceed?


#6

ping is UDP. Unsupported, details:

https://www.whonix.org/wiki/Tor#UDP

Related:

https://www.whonix.org/wiki/FAQ#Why_can.27t_I_Ping_the_Whonix-Gateway.3F


#7

That makes sense thanks @Patrick.

I’m trying this all on Nougat x86 if it helps. Still no success however I did try with DHCP and record the settings which it showed:

IP: 10.152.152.12/18
Gateway: 10.152.152.10
Mask: 255.255.192.0

I tried to configure with ndc after setting the ip and mask like:

ip addr add 10.152.152.12/18 dev eth0
ifconfig eth0 down
ndc network create 10
ndc network interface add 10 eth0
ndc network route add 10 eth0 0.0.0.0/0 10.152.152.10

However that last command results in a network unreachable error. I tried after putting eth0 up too and it failed.

I have not succeeded in getting anything to work in Chrome, apart from when using DHCP.

I have noted that ip addr add... seems to be the right way to set IP in Nougat, with the previous attempts with ifconfig eth0 [IP]... not being reflected in the output of either ifconfig or ip addr.


#8

Solved! Use the following:

su
ifconfig eth0 10.152.152.12 netmask 255.255.192.0
ip rule add from all lookup main pref 0
busybox route add default gw 10.152.152.10
ndc resolver setnetdns 100 localdomain 10.152.152.10

DNS now works.


#9

Thank you for adding this here! I am sure there’ll be other users really happy about this.

https://www.whonix.org/wiki/Other_Operating_Systems#Whonix-Android-Workstation


#10

Thank you for your tireless work on this project. And thanks for the suggestion @HulaHoop.

I lost access to my OP account, could you please add [Solved] to the title so others know this is now possible?