How to access another subnet through OpenVPN?
Posted: Mon Mar 25, 2013 8:19 am
My iPad successfully connected to my OpenVPN installed in a PC, then how can the iPad access another subnet?
My toplogy is:
Subnet 1: 10.0.0.0/255.255.255.0 (Physical LAN. OpenVPN installed in the PC with IP 10.0.0.1)
Subnet 2: 10.0.1.0/255.255.255.0 (OpenVPN virtual LAN includs the iPad with OpenVPN client installed)
OpenVPN in PC (10.0.0.1), server.ovpn:
...
proto udp
dev tun
server 10.0.1.0 255.255.255.0
push "route 10.0.0.0 255.255.255.0"
client-to-client
....
OpenVPN client in iPad, client.ovpn:
...
client
dev tun
proto udp
remote xxxx ppp
<ca>
-----BEGIN CERTIFICATE-----
...
Now, the PC has 2 IP: 10.0.0.1 & 10.0.1.1, and the iPad can successfully connect to the OpenVPN server in the PC and is assigned with an IP 10.0.1.6. The iPad can access the PC on its IP 10.0.1.1, but can not access the subnet 10.0.0.0/255.255.255.0, netither access the PC on its IP 10.0.0.1 .
BTW, I had disabled the firewall in the PC.
So, whatelse shall I do to access the subnet 1 in the iPad? Some route command in server.ovpn?
My toplogy is:
Subnet 1: 10.0.0.0/255.255.255.0 (Physical LAN. OpenVPN installed in the PC with IP 10.0.0.1)
Subnet 2: 10.0.1.0/255.255.255.0 (OpenVPN virtual LAN includs the iPad with OpenVPN client installed)
OpenVPN in PC (10.0.0.1), server.ovpn:
...
proto udp
dev tun
server 10.0.1.0 255.255.255.0
push "route 10.0.0.0 255.255.255.0"
client-to-client
....
OpenVPN client in iPad, client.ovpn:
...
client
dev tun
proto udp
remote xxxx ppp
<ca>
-----BEGIN CERTIFICATE-----
...
Now, the PC has 2 IP: 10.0.0.1 & 10.0.1.1, and the iPad can successfully connect to the OpenVPN server in the PC and is assigned with an IP 10.0.1.6. The iPad can access the PC on its IP 10.0.1.1, but can not access the subnet 10.0.0.0/255.255.255.0, netither access the PC on its IP 10.0.0.1 .
BTW, I had disabled the firewall in the PC.
So, whatelse shall I do to access the subnet 1 in the iPad? Some route command in server.ovpn?