2
3
I want to access my home network on the go, but it can only be reached via IPv6 from outside. The network(s) I want to reach it from usually only have IPv4. (How) Can I access the whole home network with a server in between?
Let's assume the following:
Network A (Home):
- Internal IP range: 192.168.0.0/24 (I'd like to keep IPv4 internally for now)
- Machine A: aaaa:bbbb:cccc:dddd (IPv6 reachable from outside)
- Machine A (internal): 192.168.0.1
Network B (Remote):
- Internal IP range: 192.168.178.0/24
- Machine B (internal): 192.168.178.2
- Public IP: 1.2.3.4 (router)
Server:
- IPv4: 2.3.4.5
- IPv6: bbbb:cccc:dddd:eeee
Now I want to access 192.168.0.3 (network A) from 192.168.178.2 (network B). Can this be accomplished using OpenVPN / (SSH) tunnels / iptables / routing? If so: How?
Sorry, usually I have a half-working approach or at least an idea how to solve my problems, but I've been thinking about this all day and there's only chaos left in my head; so I better start from scratch. (Of course my idea is that the Server to connects the IPv6 network A with the IPv4 network B. But how?)
Bonus points if all traffic between network A & the server, and the server & network B (read: the internet) is encrypted.
Thanks! All machines are linux boxes. Assuming the Server and Machine A are running OpenVPN servers (Server to Mobile: 10.0.0.1, Machine A to Server:10.10.0.1), I woud add 192.168.178.0/24 via 10.0.0.1 and 192.168.0.0/24 via 10.10.0.1 on the Server, 192.168.178.0/24 via 10.10.0.1 on Machine A, 192.168.0.0/24 via 10.0.0.1 on Mobile (plus routes on the gateways)? Can or shoud the tunnel IPs be in the same Subnet? The route on the gateway in network B would be optional, if not all of network B needed to reach network A? Huge thanks, I'll try to set this up ASAP. – NoMad – 2013-12-23T10:04:01.220
Tunnel are separate interfaces so they need their own subnet. If not every device on network B needs to access network A you could put a static route towards machine B on each device that does need it. Having a static route on the gateway is much much easier though. – Sander Steffann – 2013-12-23T13:11:21.933