Rethink about routing after vtun Configuration]

Source: Internet
Author: User
ClientRoot @ Ubuntu :~ # Ifconfig
Eth0 link encap: Ethernet hardware address 20: 6a: 8A: 43: BA: E3
Inet address: 219.245.89.broadcast: 219.245.89.255 mask: 255.255.255.0
Inet6 address: 2001: 250: 1006: 5089: 226a: 8aff: fe43: bae3/64 scope: Global
Inet6 address: fe80: 226a: 8aff: fe43: bae3/64 scope: Link
Up broadcast running Multicast MTU: 1500 hops: 1
Received data packet: 87135 error: 0 discard: 0 overload: 0 frames: 0
Send data packets: 62842 error: 0 discard: 0 overload: 0 carrier: 0
Collision: 0 sending queue length: 1000
Received byte: 13608080 (13.6 MB) sent byte: 11095792 (11.0 MB)
Interrupt: 43 basic address: 0xa000

Lo link encap: local loopback
Inet address: 127.0.0.1 mask: 255.0.0.0
Inet6 address: 1/128 scope: Host
Up loopback running MTU: 16436 hops: 1
Received data packet: 68 error: 0 discard: 0 overload: 0 frames: 0
Send data packet: 68 error: 0 discard: 0 overload: 0 carrier: 0
Collision: 0 sending queue length: 0
Received byte: 4292 (4.2 KB) sent byte: 4292 (4.2 KB)

Teredo link encap: The hardware address is not specified. 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Inet6 address: 2001: 0: 53aa: 64c: C29: 7275: 8475: b0e4/32 scope: Global
Inet6 address: fe80: FFFF/64 scope: Link
Up pointopoint running noarp multicast MTU: 1280 hops: 1
Received data packet: 0 error: 0 discard: 0 overload: 0 frames: 0
Packet sending: 12 error: 0 discard: 0 overload: 0 carrier: 0
Collision: 0 sending queue length: 500
Received byte: 0 (0.0 B) sent byte: 576 (576.0 B)

Tun1 link encap: no hardware address is specified. 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Inet address: 10.10.10.88 point-to-point: 10.10.10.99 mask: 255.255.255.255
Up pointopoint running noarp multicast MTU: 1450 hops: 1
Received data packet: 8 error: 0 discard: 0 overload: 0 frames: 0
Packet sending: 8 error: 0 discard: 0 overload: 0 carrier: 0
Collision: 0 sending queue length: 500
Received byte: 560 (560.0 B) sent byte: 560 (560.0 B)

Root @ Ubuntu :~ # Route-n
Kernel IP route table
Target gateway subnet mask flag hop reference Interface
10.10.10.99 0.0.0.0 255.255.255.255 uh 0 0 0 tun1
192.168.0.1 0.0.0.0 255.255.255.255 uh 0 0 0 tun1
219.245.89.0 0.0.0.0 255.255.255.0 u 0 0 eth0
0.0.0.0 219.245.89.254 0.0.0.0 ug 0 0 0 eth0At this time, the client Ping 192.168.0.1 has a response! But the server did not capture the encapsulated package !!!
Change the encapsulated package to UDP transmission. The server can see the encapsulated package !, But it is not unblocked or forwarded, so the client has no response
Client route
Root @ Ubuntu :~ # Route-n
Kernel IP route table
Target gateway subnet mask flag hop reference Interface
Root @ Ubuntu :~ # Route-n
Kernel IP route table
Target gateway subnet mask flag hop reference Interface
10.10.10.99 0.0.0.0 255.255.255.255 uh 0 0 0 tun3
119.75.217.56 0.0.0.0 255.255.255.255 uh 0 0 0 tun3
219.245.89.0 0.0.0.0 255.255.255.0 u 0 0 eth0
0.0.0.0 219.245.89.254 0.0.0.0 ug 0 0 0 eth0
Root @ Ubuntu :~ # Ping 119.75.217.56-I 0.01
Ping 119.75.217.56 (119.75.217.56) 56 (84) bytes of data.


Change the route to the following. The server cannot capture the encapsulated package and the client does not respond.Root @ Ubuntu :~ # Route-n
Kernel IP route table
Target gateway subnet mask flag hop reference Interface
10.10.10.99 0.0.0.0 255.255.255.255 uh 0 0 0 tun3
219.245.89.0 0.0.0.0 255.255.255.0 u 0 0 eth0
0.0.0.0 10.10.10.99 0.0.0.0 ug 0 0 0 tun3
0.0.0.0 219.245.89.254 0.0.0.0 ug 0 0 0 eth0
Root @ Ubuntu :~ # Ping 119.75.217.56-I 0.01
Ping 119.75.217.56 (119.75.217.56) 56 (84) bytes of data.

This article from the "do not learn to die" blog, please be sure to keep this source http://chinesefys.blog.51cto.com/3072467/976627

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.