📜 ⬆️ ⬇️

iPad / iPhone on a trip. Matching VPN and public network addresses

An unpleasant situation happened on vacation: the address space of the hotel's network 192.168.1.0/24 (hereinafter referred to as the home network) coincided with the address space of the working network (the computer connected to the VPN receives the address from the network 192.168.100.0/24).
When connected to a working VPN, all internal work resources remain unavailable, since in this case, to access them, the iPad / iPhone is trying to use its wireless interface, not the interface on the VPN.
Under the cut is an obvious solution, which, however, can help someone save a little time to understand the problem.

Since we cannot directly affect the routing rules for iPad / iPhone interfaces (maybe someone knows a way?), We will change the mask of our home network.
The first thing we need to do is remember the address obtained by DHCP:



In our case, this is 192.168.1.7. Now we need to switch to a static address in the network settings and set the network mask to 255.255.255.255. This will result in all packets even destined for hosts on the home network (in our case, hotel networks) being sent to the VPN interface if we correctly specify the default gateway.
')
To do this, switch to the appropriate tab in the network settings and enter the IP address that is assigned to us via DHCP, the mask 255.255.255.255 and the default gateway (router) in our VPN.



Even if the gateway address in the VPN matches the gateway address in the home network, the packets will go to the VPN, because The VPN interface has a smaller metric.

Source: https://habr.com/ru/post/123840/


All Articles