Navigation
Artikel
Stuff
RSS Feeds
|
Tutorials - IP-Tunnel zwischen Linux-RechnerSprachenübersicht/Betriebssysteme/Linux/Internet & Netzwerk Keywords: linux ip ipv6 tunnel howto tutorial InhaltsverzeichnisVorwort Top
IP-Tunnel über SSH Top
/etc/ssh/sshd_config: [..] PermitTunnel yes
Code: /etc/init.d/ssh reload
Code: ssh -w 0:0 root@remote-server
Code: # ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether de:ad:be:ef:92:d2 brd ff:ff:ff:ff:ff:ff 4: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 500 link/[65534]
Code: # auf dem Client ip link set tun0 up ip addr add 10.0.50.51/24 dev tun0
Code: # auf dem Server ip link set tun0 up ip addr add 10.0.50.50/24 dev tun0
Code: # ping 10.0.50.50 PING 10.0.50.50 (10.0.50.50) 56(84) bytes of data. 64 bytes from 10.0.50.50: icmp_seq=1 ttl=64 time=70.2 ms 64 bytes from 10.0.50.50: icmp_seq=2 ttl=64 time=69.3 ms ^C --- 10.0.50.50 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1562ms rtt min/avg/max/mdev = 69.345/69.788/70.232/0.516 ms
IP-Tunnel für IPv6 in IPv4 Top
Code: ip tunnel add sit1 mode sit remote 123.123.123.123 local 234.234.234.234 ttl 64 dev eth0 ip link set sit1 up ip addr add fd9e:21a7:a92c:2323::1/64 dev sit1
Code: # ping6 fd9e:21a7:a92c:2323::1 PING fd9e:21a7:a92c:2323::1(fd9e:21a7:a92c:2323::1) 56 data bytes 64 bytes from fd9e:21a7:a92c:2323::1: icmp_seq=1 ttl=64 time=27.6 ms 64 bytes from fd9e:21a7:a92c:2323::1: icmp_seq=2 ttl=64 time=28.0 ms ^C --- fd9e:21a7:a92c:2323::1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1013ms rtt min/avg/max/mdev = 27.650/27.845/28.040/0.195 ms
Code: # ip tunnel sit0: ipv6/ip remote any local any ttl 64 nopmtudisc sit1: ipv6/ip remote 123.123.123.123 local 234.234.234.234 ttl 64 # ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:02:e3:17:4e:f6 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:02:e3:17:52:c6 brd ff:ff:ff:ff:ff:ff 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: sit1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue link/sit 123.123.123.123 peer 234.234.234.243 # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:02:e3:17:4e:f6 brd ff:ff:ff:ff:ff:ff inet 123.123.123.123/27 brd 123.123.123.223 scope global eth0 inet6 2001:fefe:fefe::1/48 scope global valid_lft forever preferred_lft forever inet6 fe80::202:e3ff:fe17:4ef6/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:02:e3:17:52:c6 brd ff:ff:ff:ff:ff:ff inet 192.168.0.1/24 brd 192.168.0.255 scope global eth1 inet6 2001:fefe:fefe:ffff::1/64 scope global valid_lft forever preferred_lft forever inet6 fe80::202:e3ff:fe17:52c6/64 scope link valid_lft forever preferred_lft forever 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 5: sit1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue link/sit 123.123.123.123 peer 234.234.234.234 inet6 fd9e:21a7:a92c:2323::2/64 scope global valid_lft forever preferred_lft forever inet6 fe80::3e02:64c9/128 scope link valid_lft forever preferred_lft forever
Fehlersuche Top
Gibt es noch irgendwelche Fragen, oder wollen Sie über den Artikel diskutieren? Sprachenübersicht/Betriebssysteme/Linux/Internet & Netzwerk/IP-Tunnel zwischen Linux-Rechner |