FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-02-2009, 10:13 PM
Tzafrir Cohen
 
Default How to connect a Host to tunnel (so you can connect to foo.example.net instead of localhost:port)

On Fri, Jan 02, 2009 at 11:20:28AM +0200, Jabka Atu wrote:
> Howdy ,
>
> I used to ssh tunnel's to overcome NAT problems and just for fun.
> One of the thins is to do ssh -L portonmypc:NATip:NATport
> user@sshServerInFrontofNat
> This will bring the abiulty to use most of things.
>
> The question is there a way to connect this kind of tunnel to fakeip ?
> for example something in type of :
> /etc/hosts
> iport natedpc.somedomain natedpc
>
> so you can use your laptop (pc ) without further edittions.
> what i mean is that if i used (
> https://help.ubuntu.com/community/SSH_VPN ) type i would need to set it
> on two or more pc the tun devices , but i wish to do all the settings on
> one pc.

I'm not sure I understand what it is the problem you're trying to solve.

If you want a permanent tunnel and one of the parties has a permanent
name, I'd go for openvpn instead.

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-03-2009, 06:36 PM
Jabka Atu
 
Default How to connect a Host to tunnel (so you can connect to foo.example.net instead of localhost:port)

Tzafrir Cohen wrote:
> On Fri, Jan 02, 2009 at 11:20:28AM +0200, Jabka Atu wrote:
>
>> Howdy ,
>>
>> I used to ssh tunnel's to overcome NAT problems and just for fun.
>> One of the thins is to do ssh -L portonmypc:NATip:NATport
>> user@sshServerInFrontofNat
>> This will bring the abiulty to use most of things.
>>
>> The question is there a way to connect this kind of tunnel to fakeip ?
>> for example something in type of :
>> /etc/hosts
>> iport natedpc.somedomain natedpc
>>
>> so you can use your laptop (pc ) without further edittions.
>> what i mean is that if i used (
>> https://help.ubuntu.com/community/SSH_VPN ) type i would need to set it
>> on two or more pc the tun devices , but i wish to do all the settings on
>> one pc.
>>
>
> I'm not sure I understand what it is the problem you're trying to solve.
>
> If you want a permanent tunnel and one of the parties has a permanent
> name, I'd go for openvpn instead.
>
>
Ok ,
I wish to connect to NATed application without altering the clients:
the only tool i can use is ssh (this is the only server side application
that i can use);
I can't use tun on the server (AFIAK).

for example let say that i have a dns server on a private net (
10.10.0.1) and i have the www ip (firewall) 1.2.3.4
and i wish to use this dns i understand that it should be done using tun.
next i could create a new route using tun (or anything like it) to
1.2.3.4 :
tun0 will has an aceptable ip or any other way it can work inside the
other private net.
so if tun0 is the tunnel :
# route add -host 10.10.0.1 dev tun0
so i would add nameserver 10.10.0.1

and could search in the dns.

next i wish to use build server (that has ssh ) 10.10.0.2
so simple route :
# route add -host 10.10.0.2 dev tun0

etc ...

by this i can work without any extra settings on the servers.




--
---==== Jabka Atu ===---
bsh83.blogspot.com
---=== Encryption is a way of life ===---


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org