女人高潮抽搐喷水视频在线 I 色偷拍 自怕 亚洲 10p I 麻豆亚洲高清无矿砖码区 I av免费网 I caoporm超碰国产精品 I 制服丝袜美腿一区二区 I 久久久久久精品成人鲁丝电影 I 97视频中文字幕 I 91av视频在线 I 97超碰色 I 狠狠色伊人亚洲综合第8页 I 丁香网婷婷 I 国产 成人 综合 亚洲 网站 I 欧美黄色一级片在线观看 I 天天爽夜夜爽人人爽免费 I 成人天堂资源www在线 I 天天干小说 I 国产尤物网站 I 男人天堂午夜 I 亚洲人成在久久综合网站 I 欧美日韩高清在线 I 2022色婷婷综合久久久 I 九九在线观看视频 I 国产思思 I 自拍性旺盛老熟女 I 日本不卡视频 I 免费一级a毛片在线播放 I 激情婷

聯(lián)系電話: 18171260050

技術(shù)文檔

  • 13,Nov,2024

簡單橋接與 DHCP 客戶端

# Company:  PowerCraft Technology
# Author:   Copyright Jelle de Jong <jelledejong@powercraft.nl>
# Note:     Please send me an email if you enhanced the document
# Date:     2010-05-24 / 2010-07-04
# License:  CC-BY-SA

# This document is free documentation; you can redistribute it and/or
# modify it under the terms of the Creative Commons Attribution Share
# Alike as published by the Creative Commons Foundation; either version
# 3.0 of the License, or (at your option) any later version.
#
# This document is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Creative Commons BY-SA License for more details.
#
# https://creativecommons.org/licenses/by-sa/

#-----------------------------------------------------------------------

# for commercial support contact me, part of the revenue go back to tinc

#-----------------------------------------------------------------------

# https://www.tinc-vpn.org/
# https://www.tinc-vpn.org/documentation/tinc_toc

#-----------------------------------------------------------------------

# this is the configuration of the roxy system

#-----------------------------------------------------------------------

unset LANG LANGUAGE LC_ALL
apt-get update; apt-get dist-upgrade

apt-cache show tinc
apt-get install tinc/testing

#-----------------------------------------------------------------------

/etc/init.d/tinc stop

#-----------------------------------------------------------------------

# ls -hal /dev/net/tun
crw------- 1 root root 10, 200 May 24 15:53 /dev/net/tun

# grep tinc /etc/services
tinc        655/tcp             # tinc control port
tinc        655/udp

# getent services tinc/udp
tinc        655/udp
# getent services tinc/tcp
tinc        655/tcp

cat /usr/share/doc/tinc/README.Debian
zcat /usr/share/doc/tinc/README.gz | less
zcat /usr/share/doc/tinc/NEWS.gz | less
cat /usr/share/doc/tinc/examples/tinc-up
w3m /usr/share/doc/tinc/tinc_0.html

#-----------------------------------------------------------------------

vim /etc/default/tinc
EXTRA="-d"
cat /etc/default/tinc

# less /etc/init.d/tinc

#-----------------------------------------------------------------------

ifconfig -a
route -n

#-----------------------------------------------------------------------

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0d:b9:1a:44:6c
          inet addr:84.245.9.246  Bcast:84.245.9.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4863 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2958 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4302418 (4.1 MiB)  TX bytes:303100 (295.9 KiB)
          Interrupt:10 Base address:0x1000

eth1      Link encap:Ethernet  HWaddr 00:0d:b9:1a:44:6d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:11 Base address:0x1400

eth2      Link encap:Ethernet  HWaddr 00:0d:b9:1a:44:6e
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:15 Base address:0x1800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:96572 (94.3 KiB)  TX bytes:96572 (94.3 KiB)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
84.245.9.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         84.245.9.1      0.0.0.0         UG    0      0        0 eth0

#-----------------------------------------------------------------------

# client01 configuration

cat /etc/tinc/nets.boot
echo 'powercraft01' | sudo tee --append /etc/tinc/nets.boot
cat /etc/tinc/nets.boot

#-----------------------------------------------------------------------

sudo mkdir --verbose /etc/tinc/powercraft01/
sudo mkdir --verbose /etc/tinc/powercraft01/hosts/
sudo touch /etc/tinc/powercraft01/tinc.conf

#-----------------------------------------------------------------------

# on server
cat /etc/tinc/powercraft01/hosts/server01

# on client, copy cert data of server to client
sudo vim /etc/tinc/powercraft01/hosts/server01

# on client, add on head of file
Address = powercraft.nl 656
Address = 84.245.3.195 656
Address = tinc-vpn.powercraft.nl 656
Address = powercraft.nl 655
Address = 84.245.3.195 655
Address = tinc-vpn.powercraft.nl 655

#-----------------------------------------------------------------------

echo 'ConnectTo = server01
Device = /dev/net/tun
Interface = tun1
Mode = switch
Name = client01' | sudo tee /etc/tinc/powercraft01/tinc.conf

sudo cat /etc/tinc/powercraft01/tinc.conf
sudo chmod 644 /etc/tinc/powercraft01/tinc.conf
ls -hal /etc/tinc/powercraft01/tinc.conf

echo '#!/bin/sh
ifconfig $INTERFACE 0.0.0.0' | tee /etc/tinc/powercraft01/tinc-up

sudo cat /etc/tinc/powercraft01/tinc-up
sudo chmod 755 /etc/tinc/powercraft01/tinc-up
ls -hal /etc/tinc/powercraft01/tinc-up

echo '#!/bin/sh
# ifconfig tun1 hw ether 00:ff:5d:ea:b4:ec
ifup $INTERFACE &' | sudo tee /etc/tinc/powercraft01/hosts/server01-up

sudo cat /etc/tinc/powercraft01/hosts/server01-up
sudo chmod 755 /etc/tinc/powercraft01/hosts/server01-up
ls -hal /etc/tinc/powercraft01/hosts/server01-up

echo '#!/bin/sh
ifconfig $INTERFACE down' | sudo tee /etc/tinc/powercraft01/tinc-down

sudo cat /etc/tinc/powercraft01/tinc-down
sudo chmod 755 /etc/tinc/powercraft01/tinc-down
ls -hal /etc/tinc/powercraft01/tinc-down

echo '#!/bin/sh
ifdown $INTERFACE' | sudo tee /etc/tinc/powercraft01/hosts/server01-down

sudo cat /etc/tinc/powercraft01/hosts/server01-down
sudo chmod 755 /etc/tinc/powercraft01/hosts/server01-down
ls -hal /etc/tinc/powercraft01/hosts/server01-down

#-----------------------------------------------------------------------

sudo rm /etc/tinc/powercraft01/rsa_key.priv
sudo rm /etc/tinc/powercraft01/hosts/client10
sudo tincd -n powercraft01 -K

#-----------------------------------------------------------------------

# on client add on head of file
sudo vim /etc/tinc/powercraft01/hosts/client01
Compression = 9
PMTU = 1492
PMTUDiscovery = yes
Port = 656
# Cipher = aes-128-cbc

# on client
sudo cat /etc/tinc/powercraft01/hosts/client01

# on server, copy cert data of client to server
vim /etc/tinc/powercraft01/hosts/client01

#-----------------------------------------------------------------------

# watch out when using multiple dhcp clients there can be conflicts

echo 'interface "tun1" {
  request subnet-mask, broadcast-address, time-offset,
    host-name, netbios-scope, interface-mtu, ntp-servers;
}' | tee --append /etc/dhcp3/dhclient.conf

cat /etc/dhcp3/dhclient.conf

#-----------------------------------------------------------------------

vim /etc/network/interfaces

iface tun1 inet dhcp
  pre-up ifconfig tun1 down || true
  pre-up ifconfig tun1 hw ether 9a:f6:50:3b:c0:48 || true
  post-up route del default dev tun1 || true
  # pre-down /etc/init.d/munin-node stop || true
  # post-up /etc/init.d/munin-node restart || true
  # optional # post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/tun1/proxy_arp || true
  # optional # post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/vlan4/proxy_arp || true
  # optional # post-up route add -net 192.168.2.0 netmask 255.255.255.0 tun1 || true
  # optional # pre-down route del -net 192.168.2.0 netmask 255.255.255.0 tun1 || true

#-----------------------------------------------------------------------

ifdown tun1; ifdown tun1

#-----------------------------------------------------------------------

sudo /etc/init.d/tinc stop
fg
sudo /usr/sbin/tincd --net powercraft01 --no-detach --debug=5

#-----------------------------------------------------------------------

sudo /etc/init.d/tinc start

#-----------------------------------------------------------------------

# tincd --version
tinc version 1.0.13 (built Apr 13 2010 10:27:56, protocol 17)

#-----------------------------------------------------------------------

tincd -n powercraft01 -kUSR2
tail -n 100 /var/log/syslog

#-----------------------------------------------------------------------

May 24 19:43:59 roxy tinc.powercraft01[5104]: Statistics for Linux tun/tap device (tap mode) /dev/net/tun:
May 24 19:43:59 roxy tinc.powercraft01[5104]:  total bytes in:         830
May 24 19:43:59 roxy tinc.powercraft01[5104]:  total bytes out:        914
May 24 19:43:59 roxy tinc.powercraft01[5104]: Nodes:
May 24 19:43:59 roxy tinc.powercraft01[5104]:  client01 at MYSELF cipher 0 digest 0 maclength 0 compression 0 options c status 0018 nexthop client01 via client01 pmtu 1518 (min 0 max 1518)
May 24 19:43:59 roxy tinc.powercraft01[5104]:  server01 at 84.245.3.195 port 656 cipher 91 digest 64 maclength 4 compression 9 options c status 001a nexthop server01 via server01 pmtu 1416 (min 1416 max 1416)
May 24 19:43:59 roxy tinc.powercraft01[5104]: End of nodes.
May 24 19:43:59 roxy tinc.powercraft01[5104]: Edges:
May 24 19:43:59 roxy tinc.powercraft01[5104]:  client01 to server01 at 84.245.3.195 port 656 options c weight 413
May 24 19:43:59 roxy tinc.powercraft01[5104]:  server01 to client01 at 84.245.9.246 port 655 options c weight 413
May 24 19:43:59 roxy tinc.powercraft01[5104]: End of edges.
May 24 19:43:59 roxy tinc.powercraft01[5104]: Subnet list:
May 24 19:43:59 roxy tinc.powercraft01[5104]:  0:1b:21:61:af:d7#10 owner server01
May 24 19:43:59 roxy tinc.powercraft01[5104]:  56:fc:c2:fd:69:10#10 owner server01
May 24 19:43:59 roxy tinc.powercraft01[5104]:  ea:3:e7:3d:46:20#10 owner client01
May 24 19:43:59 roxy tinc.powercraft01[5104]: End of subnet list.

#-----------------------------------------------------------------------

# ifconfig -a
ifconfig tun1
route -n

#-----------------------------------------------------------------------

# ifconfig tun1
tun1      Link encap:Ethernet  HWaddr ea:03:e7:3d:46:20
          inet addr:192.168.3.201  Bcast:192.168.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:9342 (9.1 KiB)  TX bytes:9088 (8.8 KiB)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
84.245.9.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 tun1
0.0.0.0         84.245.9.1      0.0.0.0         UG    0      0        0 eth0

#-----------------------------------------------------------------------

ping -c 2 192.168.3.1
ping -c 2 -M dont -s 1500 192.168.3.1

#-----------------------------------------------------------------------

lsof -i :655
lsof -i :656

#-----------------------------------------------------------------------

# Accept new connections for fordwarding designated from our virtual private netwerk to the local network
/sbin/iptables --append FORWARD --in-interface ${VPN01} --out-interface ${LAN01} --jump ACCEPT
/sbin/iptables --append FORWARD --in-interface ${LAN01} --out-interface ${VPN01} --jump ACCEPT

# Use masquerade so the outside world sees only one ip source for all outgoing trafic
/sbin/iptables --table nat --append POSTROUTING --out-interface ${VPN01} --jump MASQUERADE

#-----------------------------------------------------------------------

主站蜘蛛池模板: 亚洲日韩中文字幕 | 偷偷碰偷偷鲁免费视频一区 | 精品久久久久av免费观看 | 成午夜精品一区二区三区软件 | 极品新婚夜少妇真紧 | 久久久亚洲影院你懂的 | www.97色| 婷婷久久综合九色国产成人 | 色妞网| 国产中文字幕在线免费观看 | 麻豆安全免费网址入口 | 亚洲中文色欧另类欧美 | 欧美日韩视频免费 | 日韩中文在线观看 | 亚洲国产福利成人一区 | 女被啪到深处喷水gif动态图 | 人人草97 | 国产美女福利视频 | 99亚洲精品 | 人人干日日操 | 久久综合在线 | 8x8x国产一区二区三区精品推荐 | 国产福利三区 | 午夜手机看片 | 插插看看| 国产精品视频一区二区免费不卡 | 亚洲xxxx3d | 五月天激情四射 | 综合亚洲综合图区网友自拍 | 噼里啪啦免费观看高清动漫 | 亚洲欧洲美洲无码精品va | 教室激情吃奶亲下面免费观看 | 国产午夜精品视频在线播放 | 成熟老妇女视频 | 在哪看毛片| 秋霞av无码一区二区三区试看 | 亚洲一区激情 | 性欧美vr高清极品 | 天堂中文字幕在线播放 | 小婷又软又嫩又紧水又多的视频 | 久久中文字幕国产 | 欧美va亚洲 | 曰本无码人妻丰满熟妇啪啪 | 亚洲欧美小视频 | 欧美国产成人精品二区 | 亚洲专区在线视频 | 亚洲男人天堂2018av | 青青草原播放器 | 亚洲欧美日韩精品久久奇米一区 | 视频一区二区在线播放 | 日韩一区二区视频 | 亚洲高清免费视频 | 久久99视频免费 | 欧美奶涨边摸边做爰视频 | 精品人妻av一区二区三区 | 色综合久久久久综合99 | 欧美日韩视频网站 | 成人精品一区二区三区网站 | 欧美性极品少妇xxxx | 国产成人无码视频一区二区三区 | 中文字幕第68页 | 国产精品污www在线观看17c | 毛片在线免费观看网址 | 欧美精品色哟哟 | 国产精品久久久久久无码 | 久久久久久久性潮 | 九色91视频| 国产五级床片全部免费硬硬 | 偷看少妇自慰xxxx | 国精品一区二区 | 夜色毛片永久免费 | 国语对白在线观看 | 国产视频精品免费 | 国产一卡2卡3卡四卡精品app | 强开小嫩苞一区二区三区网站 | 国产国产人免费视频成69 | 亚洲爱情岛论坛网站首页壹 | 精品无人乱码一区二区三区 | china国产乱xxxxx绿帽 | 果冻传媒mv免费播放在线观看 | 青青激情网 | 国产在沙发上午睡被强 | 精品午夜熟女人妻视频毛片 | 国产在线精品一区二区三区直播 | 久热这里只有精品99在线观看 | 91视频官网 | 日本一区二区三区免费高清 | 一区二区黄色 | 中出视频在线观看 | 丰满少妇被猛烈进av毛片 | 性中国videossexo另类 | 91精品国产乱码久久久张津瑜 | 美女爽到呻吟久久久久 | 国产精品国产三级国产aⅴ下载 | 国产精品久久久久久 | 国产精品视频自拍 | 国内性生活视频 | 欧美精品无码一区二区三区 | 一个综合色 |