Is it possible to make a host B connected through a tunnel to a host A,
which itself is directly connected to an internet subnet, appear on that
same subnet as if it was directly connected to it?
At my university there are many services available on the campus
internet subnet. At home I have a laptop hooked up to internet first
through my own wireless router and, from there, through a cable modem.
From home, I can't use the services, because they are not available to
computers outside the campus subnet. Therefore, I would like to make it
appear as if my laptop was hooked up directly on the subnet.
Now, at my university office, I have a desktop linux machine with a
valid fixed IP address on the campus subnet. My laptop also have a
fixed IP on the campus subnet.
I've succeeded in setting up a tunnel from my laptop at home to my
office desktop computer. From within my office desktop computer, I see
my home laptop through the tunnel device. However, it does not appear
on the subnet for other computers to access. How do I do that?
In the desktop computer, call it A, the NIC is on device eth0 with
address x.x.x.a. The tunnel device, tun1, has address x.x.x.b.
(x.x.x.a and x.x.x.b is my registered fixed IP addresses on the compus
subnet.) I thought I could just:
arp -i eth0 -s x.x.x.b h:h:h:h:h:h pub
where h:h:h:h:h:h is the hardware address of eth0, in order to let A
tell other computers on the subnet where to send packets for B, and,
ifconfig eth0 promisc
in order to let those packets through.
This didn't work, so I assume that I have the wrong idea about how these
things work. Could anyone please advice me?
Also, if I would like to go one step further, to associate the actual
hardware address of B, H:H:H:H:H:H to x.x.x.b, I have the idea of
installing a second NIC in B and do:
ifconfig eth1 x.x.x.b netmask m.m.m.m hw ether H:H:H:H:H:H
But then I'd somehow get eth1 to work as a proxy for tun1 (bridging???).
Any advice here?
I'm asking for the simplest possible solution, given that I only want
one machine, B at home, to appear on A:s subnet.