Host from tunnel as virtual host?

Host from tunnel as virtual host?

Post by Mikael Djurfeld » Thu, 25 Mar 2004 07:37:17



Hi,

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.

Best regards,
Mikael D.

 
 
 

Host from tunnel as virtual host?

Post by /dev/rob » Sat, 03 Apr 2004 04:35:11



> 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?

You didn't mention the VPN you used. Is it OpenVPN? That might affect
things.

Quote:> But then I'd somehow get eth1 to work as a proxy for tun1 (bridging???).
>   Any advice here?

You should be using a tapX rather than tunX interface for bridging. tun
is a TCP/IP tunnel, whereas tap is an emulated Ethernet device. A tap
interface can handle non-TCP/IP traffic.

Bridging is fairly straightforward. You do need to have bridge tools
(brctl?) installed. Both OpenVPN and the bridge tools site (both hosted
at sourceforge) have bridging HOWTOs which should be simple to follow.
--

  or put "not-spam" or "/dev/rob0" in Subject header to reply

 
 
 

1. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

Hello.

Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: www.serverA.net pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have

A.B.C.D         www.default.net www.virtA.net www.virtB.net

In ../conf/httpd.conf I have;

<VirtualHost www.virtA.net>

DocumentRoot /usr/local/www/virtA
ServerName www.virtA.net
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log
</VirtualHost>

<VirtualHost www.virtB.net>

DocumentRoot /usr/local/www/virtB
ServerName www.virtB.net
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log
</VirtualHost>

--

2. Why are entries getting added to routing table???

3. FrontPage virtual hosting, removal or reset of virtual host

4. apache 1.1.3 and PUT method

5. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

6. Multiport serial board problem (ByteRunner PCI-400HS)

7. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

8. anonymous slip login possible ?

9. For Discussion: web virtual hosting vs mail virtual hosting

10. Appropriate HTTP Error Code for "No Default Host" in Name-Based Virtual Host Setup

11. virtual host redirecting to real host

12. Moving Host/Virtual Host Question

13. Host-header Virtual Hosts