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.
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.
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.
Actually, the method I mentioned above doesn’t work reliably all - it seems to work whenever it wants.
I’ve found another solution, a much easier one - no CLI needed, it’s configured in Android itself - just go to the WiFi panel, forget “VirtWifi”, create a new WiFi connection there with the same name and a static route option (not DHCP):
ip address = 10.152.152.12
gateway 10.152.152.10
subnet 18
Hello, I have already tried everything, but I can not get the Internet to work.
The last thing I stopped at was the iik user’s way of “create a new WiFi connection there with the same name and…”
I created a new wifi with the same settings:
ip address = 10.152.152.12
gateway 10.152.152.10
subnet 18
But android just can not connect to this network, what could be the problem?