Re: vtun
On Sat, 2002-05-18 at 01:28, Federico Di Gregorio wrote:
> Il ven, 2002-05-17 alle 21:37, Stefano Simonucci ha scritto:
>
> non so se sbagli ma di certo ci sono alcune imprecisioni. per far
> funzionare vtun devi avere un server ed un client. entrambi devono avere
> compilato nel kernel (o caricato come modulo) l'universal tunneling
> device: "tun". poi, se non usi devfs devi creare l'opportuno nodo in
> /dev/misc/net/tun.
>
> quando il client contatta il server, si creano su entrambe le macchine
> due nuove interfacce di rete (tunX) che puoi configurare come al solito
> (in genere ifconfig point-to-point e poi route se necessario).
>
> se ti serve ti mando i file di configurazione del mio server e del
> portatile che lo contatta usando vtun (password escluse ;)
>
> --
> Federico Di Gregorio
> Debian GNU/Linux Developer & Italian Press Contact fog@debian.org
> INIT.D Developer fog@initd.org
> Those who do not study Lisp are doomed to reimplement it. Poorly.
> -- from Karl M. Hegbloom .signature
Ora ho inserito il modulo tun nel kernel (con modconf) poi
ho fatto il device con mknod sui due PC e poi ho dato i comandi
vtund -s (sul PC server)
e
vtund lion <host del server> (sul PC client)
vtund.conf del server era
----------
options {
port 5000; # Listen on this port.
# Path to various programs
ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/iptables;
}
# Default session options
default {
compress no; # Compression is off by default
speed 0; # By default maximum speed, NO shaping
}
# Ethernet example. Session 'lion'.
lion {
pass <....>; # Password
type ether; # Ethernet tunnel
device tap0; # Device tap0
proto tcp; # UDP protocol
comp lzo:1; # LZO compression level 1
encr yes; # Encryption
stat yes; # Log connection statistic
keepalive yes; # Keep connection alive
up {
# Connection is Up
# Assign IP address
ifconfig "%% 10.1.0.1 netmask 255.255.255.0";
};
down {
# Connection is Down
# Shutdown tap device.
ifconfig "%% down";
};
}
---------
e vtund.conf del client
------------------
options {
port 5000; # Connect to this port.
timeout 60; # General timeout
syslog 5;
# Path to various programs
ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/iptables;
}
# Ethernet example. Session 'lion'.
lion {
pass <....>; # Password
type ether; # Ethernet tunnel
device tap1; # Device tap1
proto tcp; # Protocollo tcp
comp lzo:1; # LZO compression level 1
encr yes; # Encryption
stat yes; # Log connection statistic
up {
# Connection is Up
# Assign IP address and netmask.
ifconfig "%% 10.1.0.2 netmask 255.255.255.0";
};
down {
# Connection is Down
# Shutdown tap device
ifconfig "%% down";
};
}
---------------------
dopo l'avvio /sbin/route da' le seguenti routing tables
10.1.0.0 * 255.255.255.0 U 0 0 0
tap0
e
10.1.0.0 * 255.255.255.0 U 0 0 0
tap1
.
Pero' se faccio
dal server
ping 10.1.0.2
<ottengo>
PING 10.1.0.2 (10.1.0.2): 56 data bytes
ping: sendto: Operation not permitted
ping: wrote 10.1.0.2 64 chars, ret=-1
e cosi' se faccio ping 10.1.0.1 dal client.
Qualche suggerimento?
Grazie
Stefano
--
To UNSUBSCRIBE, email to debian-italian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to:
- References:
- vtun
- From: Stefano Simonucci <stefano.simonucci@tin.it>
- Re: vtun
- From: Federico Di Gregorio <fog@initd.org>