女人高潮抽搐喷水视频在线 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 激情婷

聯系電話: 18171260050

技術文檔

  • 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/examples/bridging
# https://www.tinc-vpn.org/documentation/tinc_toc

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

# <@guus> Well all the tinc daemons together act like a single switcch
# <@guus> And each node in the VPN is connected to a port of that switch
# <@guus> And if you bridge the VPN interface with eth0, then it's like you plug a cable in a port of your eth0 LAN and the other end of that cable into the tinc switch

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

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

apt-cache show tinc
apt-get install tinc
apt-get install bridge-utils

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

/etc/init.d/tinc stop

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

# ls -hal /dev/net/tun
crw-rw-rw- 1 root root 10, 200 May 20 20:07 /dev/net/tun

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

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

cat /etc/default/tinc
less /etc/init.d/tinc

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

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

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

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

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

ls -hal /etc/tinc/scallab01/
mkdir --verbose /etc/tinc/powercraft01/
mkdir --verbose /etc/tinc/powercraft01/hosts/
touch /etc/tinc/powercraft01/tinc.conf

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

vim /etc/network/interfaces

# tinc-vpn: dhcp bridge
auto br0
  iface br0 inet static
  address 192.168.3.1
  netmask 255.255.255.0
# pre-up /sbin/ifconfig eth2 hw ether 00:1b:21:61:af:d7
# pre-up /sbin/ifconfig eth2 0.0.0.0
# bridge_ports eth2
  bridge_ports tun1
  bridge_maxwait 1
  bridge_fd 2.5
  post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp # optional

cat /etc/network/interfaces

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

echo 'interface "br0" {
  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/dhcp3/dhcpd.conf

subnet 192.168.3.0 netmask 255.255.255.0 {
    range 192.168.3.200 192.168.3.240;
    option routers 192.168.3.1;
    option domain-name-servers 192.168.3.1;
}

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

ifdown br0
ifup br0

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

vim /etc/default/dhcp3-server
    INTERFACES="vlan2 eth0 br0" # add the br0 to the correct location

/etc/init.d/dhcp3-server restart
ps aux | grep dhcp
tail -n 400 -f /var/log/syslog

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

ifconfig br0
route -n
brctl show

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

# ifconfig br0
br0       Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::dc56:d3ff:fe1a:31df/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2568 (2.5 KB)  TX bytes:1536 (1.5 KB)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 vlan2
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
84.245.3.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         84.245.3.1      0.0.0.0         UG    100    0        0 eth1

# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.000000000000   no

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

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

cat /etc/tinc/powercraft01/tinc.conf
chmod 640 /etc/tinc/powercraft01/tinc.conf
ls -hal /etc/tinc/powercraft01/tinc.conf

echo '#!/bin/sh
ifconfig $INTERFACE 0.0.0.0
route add -net 192.168.30.0 netmask 255.255.255.0 br0 # optional subnet
brctl addif br0 $INTERFACE' | tee /etc/tinc/powercraft01/tinc-up

cat /etc/tinc/powercraft01/tinc-up
chmod 750 /etc/tinc/powercraft01/tinc-up
ls -hal /etc/tinc/powercraft01/tinc-up

echo '#!/bin/sh
brctl delif br0 $INTERFACE
route del -net 192.168.30.0 netmask 255.255.255.0 br0 # optional subnet
ifconfig $INTERFACE down' | tee /etc/tinc/powercraft01/tinc-down

cat /etc/tinc/powercraft01/tinc-down
chmod 750 /etc/tinc/powercraft01/tinc-down
ls -hal /etc/tinc/powercraft01/tinc-down

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

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

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

getent services | grep 656

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

vim /etc/tinc/powercraft01/hosts/server01

# add on head of file
Compression = 9
PMTU = 1492
PMTUDiscovery = yes
Port = 656

cat /etc/tinc/powercraft01/hosts/server01

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

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

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

/etc/init.d/tinc restart
tail --line=500 --follow /var/log/syslog

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

ifconfig br0
ifconfig tun1
route -n
brctl show br0
brctl showmacs br0

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

# ifconfig br0
br0       Link encap:Ethernet  HWaddr 1e:eb:95:c3:04:d8
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::dc56:d3ff:fe1a:31df/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3328 (3.3 KB)  TX bytes:2408 (2.4 KB)

# ifconfig tun1
tun1      Link encap:Ethernet  HWaddr 1e:eb:95:c3:04:d8
          inet6 addr: fe80::1ceb:95ff:fec3:4d8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:2627 (2.6 KB)  TX bytes:1340 (1.3 KB)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 vlan2
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
84.245.3.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         84.245.3.1      0.0.0.0         UG    100    0        0 eth1

# brctl show br0
bridge name bridge id       STP enabled interfaces
br0     8000.1eeb95c304d8   no      tun1

# brctl showmacs br0
port no mac addr        is local?   ageing timer
  1 1e:eb:95:c3:04:d8   yes        0.00
  1 86:03:27:21:2e:60   no        44.19

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

ps aux | grep tincd
tincd -n powercraft01 -kUSR2
tail -n 100 /var/log/syslog

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

May 24 17:29:31 ashley tinc.powercraft01[11557]: Statistics for Linux tun/tap device (tap mode) /dev/net/tun:
May 24 17:29:31 ashley tinc.powercraft01[11557]:  total bytes in:         468
May 24 17:29:31 ashley tinc.powercraft01[11557]:  total bytes out:          0
May 24 17:29:31 ashley tinc.powercraft01[11557]: Nodes:
May 24 17:29:31 ashley tinc.powercraft01[11557]:  server01 at MYSELF cipher 0 digest 0 maclength 0 compression 0 options 4 status 0018 nexthop server01 via server01 pmtu 1518 (min 0 max 1518)
May 24 17:29:31 ashley tinc.powercraft01[11557]: End of nodes.
May 24 17:29:31 ashley tinc.powercraft01[11557]: Edges:
May 24 17:29:31 ashley tinc.powercraft01[11557]: End of edges.
May 24 17:29:31 ashley tinc.powercraft01[11557]: Subnet list:
May 24 17:29:31 ashley tinc.powercraft01[11557]:  a2:63:0:96:a:c8#10 owner server01
May 24 17:29:31 ashley tinc.powercraft01[11557]: End of subnet list.

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

tcpdump -n -i br0 broadcast
tcpdump -n -i tun0 broadcast

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

tcpdump -n -e -i br0 icmp
tcpdump -A -p -n -i br0 port 80
tcpdump -A -p -n -i br0

tcpdump -i br0 host 84.245.3.195 -l

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

cat /var/lib/dhcp3/dhcpd.leases

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

# optional
export LAN01=vlan2
export VPN02=br0
# /sbin/iptables --append FORWARD --in-interface br0 --out-interface vlan2 --jump ACCEPT
/sbin/iptables --append FORWARD --in-interface ${VPN02} --source 192.168.3.150 --destination 192.168.2.206 --out-interface ${LAN01} --jump ACCEPT

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

主站蜘蛛池模板: 久久久青草青草免费看 | 欧美一区二区三区久久综 | 999精华液一区二区www | 天天射网 | 久久久手机看片 | 国产亚洲久久久久久久 | 被拉到野外强要好爽黑人 | 2020精品国产自在现线官网 | 麻豆成人久久精品综合网址 | 国产乱人偷精品免费视频 | 日韩欧美高清视频在线观看 | 色综合视频一区二区三区 | 亚洲精品成人网久久久久久 | 欧美视频中文字幕 | 久久久久久久久久久九 | 国产99视频精品免费视频7 | 国产亚洲精品久久久 | 理论片午午伦夜理片影院99 | 香蕉网在线 | 好看的欧美熟妇www在线 | 91欧美视频| 熟女视频一区二区在线观看 | 色噜噜狠狠狠狠色综合久一 | 国产午夜久久久 | 亚洲精品久久久蜜夜影视 | 久久亚洲精品小早川怜子66 | 精品九九九九 | 国产精品热久久无码av | 日韩黄色免费网站 | 午夜成人无码片在线观看影院 | 欧美日韩69 | 欧美午夜一区二区三区免费大片 | 6080私人午夜性爽快影院 | 激情欧美一区二区三区免费看 | 亚洲 欧美 另类图片 | 日韩无砖专区2021嘟嘟网 | 无码视频免费一区二区三区 | 九九视频免费在线观看 | 久福利 | 张柏芝亚洲一区二区三区 | aa免费在线观看 | 亚洲日韩∨a无码中文字幕 国产精品女生 | 国产大片中文字幕在线观看 | av视觉盛宴 | 日日操夜夜摸 | 熟女人妇交换俱乐部 | 国产对白在线播放 | 国产美女免费网站 | 欧美日本久久 | 亚洲v天堂 | 三级全黄做爰视频在线手机观看 | 午夜精品久久久久久久久日韩欧美 | 午夜性刺激免费看视频 | 日韩综合精品 | 超碰公开在线 | 少妇性bbb搡bbb爽爽爽欧美 | 超碰在线观看免费 | 丰满岳妇乱一区二区三区 | 92午夜少妇极品福利无码电影 | 久久不见久久见中文字幕免费 | 亚洲成年轻人电影网站www | 免费在线播放黄色片 | 狠狠色婷婷狠狠狠亚洲综合 | 男人天堂免费视频 | 午夜视频网站在线观看 | 中字无码av在线电影 | 精品国产av无码一区二区三区 | 久草福利视频 | 久久精品无码专区免费青青 | 在线观看国产视频 | 国产黄色网址大全 | 国自产在线精品一本无码中文 | www男人天堂 | 人妻av久久一区波多野结衣 | 久久人人爽人人爽人人片dvd | 亚洲五月天综合 | 国产日产精品一区二区三区 | 亚洲精品无码鲁网午夜 | av96| 日韩一级免费 | 亚洲精品ww久久久久久p站 | 中文字幕精品久久久久人妻 | 亚洲中文字幕永久在线不卡 | 竹菊影视欧美日韩一区二区三区四区五区 | 色八区人妻在线视频 | 久草在线免费色站 | 97人妻成人免费视频 | 男女黄色毛片 | 91精品国产综合久久香蕉922 | 日本激情吻胸吃奶呻吟视频 | 免费国产黄网站在线观看可以下载 | 一本色道久久综合狠狠躁篇怎么玩 | 久久青青热 | 国产日韩视频在线 | 国产性生交大片免费 | 国产欧美一区二区三区视频在线观看 | 国产中年夫妇高潮精品视频 | 亚洲福利视频导航 | 五月婷中文 |