Hendrik Greving wrote:
> Tauno Voipio wrote:
>
>> Hendrik Greving wrote:
>>
>>> Tauno Voipio wrote:
>>>
>>>> Hendrik Greving wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have a gateway which routes/nat my LAN traffic to a vpn (vpnc)
>>>>> tunnel. This tunnel goes to university which blocks many ports.
>>>>> On the other hand, there's a backup connection which can be used on
>>>>> the regular interface (in my case eth1) which is open.
>>>>>
>>>>> So
>>>>> currently everything goes to vpnlink (vpnc interface)
>>>>>
>>>>> In order to bypass the ports blockers,
>>>>>
>>>>> Can I make connections using a certain port go through the eth1
>>>>> interface?
>>>>> Can I make all traffic of a certain IP to be routed to the eth1
>>>>> interface?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Please note that many VPN systems disable other network
>>>> traffic for the duration of the tunnel connection. This
>>>> is done to prevent sneak paths around the organization's
>>>> firewall (probably the thing you're trying to achieve).
>>>>
>>>
>>> That's right, but I use vpnc, which doesn't block other devices.
>>
>>
>>
>> You could try the other way: route the university subnet(s)
>> to the tunnel (tun0) and point the default gateway to the
>> direct interface.
>>
>> The routing gets more complicated if the tunnel is done
>> at the data link layer (using tap0).
>>
> Hm and whats the difference between making the tunnel as default or the
> direct interface?
If the tunnel inside is the default route, all traffic
to the Internet out of your local net will enter the
tunnel and pass via the gateway and firewall at the
other end.
If the direct interface is the default route, all traffic
to the Internet will go to the Net directly via your ISP,
by-passing the tunnel and the firewall at the other end.
The traffic destined to the other end of the tunnel may
be picked off the default routing by suitable routes
destined to the tunnel inside.
> How is nat configured then?
NAT is handled before the decisions above. Its purpose
is to mark the IP address of your gateway as the publicly
seen sender of the packets. The routing does not affect
the garden-variety NAT (IP-Masquerading) in any way.
---
BUT ...
The considerations above apply for an IP-layer tunnel
(using tun0 with OpenVPN). The link-layer tunneling
is more complicated to handle here, though there are
possibilities with ebtables (no misprint, Google for
it).
--
Tauno Voipio
tauno voipio (at) iki fi
|