欧美黄色小说视频-极品少妇hdxx麻豆hdxx-黑巨人与欧美精品一区-国产高清在线精品一区二区三区-久久久久久99精品久久久-国产又粗又黄又爽的大片-一级做a毛片-色天天躁夜夜躁天干天干-国产视频你懂的-特级黄录像视频-开心春色激情网-免费看国产一级片-网站黄色在线免费观看-欧美三级在线-欧美一区二区三区在线-最新av在线播放-么公的好大好硬好深好爽视频-亚洲色大成网站www永久男同-每日更新av-美女久久久久久

路由器

當前位置:首頁>IT運維>路由器
全部 17 路由器 17

與 DHCP 服務器端的簡單橋接

時間:2025-03-24   訪問量:1392

# 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

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

上一篇:簡單橋接與 DHCP 客戶端

下一篇:zeroconf IP 和 DNS 配置

發表評論:

評論記錄:

未查詢到任何數據!

在線咨詢

點擊這里給我發消息 售前咨詢專員

點擊這里給我發消息 售后服務專員

在線咨詢

免費通話

24小時免費咨詢

請輸入您的聯系電話,座機請加區號

免費通話

微信掃一掃

微信聯系
返回頂部
主站蜘蛛池模板: 天天躁夜夜躁狠狠是什么心态 | 亚洲无吗在线 | 污漫在线观看 | 久久高清超碰av热热久久 | 天天做日日做天天做 | 一级黄色免费片 | va精品| 国语自产拍91在线a拍拍 | 日韩一区二区三区视频在线观看 | 亚洲女同在线 | 亚洲 都市 校园 激情 另类 | 卡1卡2卡3国产精品 国产精品精东影业 | 日本黄色动态图 | 天天操综合 | 激情文学亚洲 | 无码人妻精品一区二区三区蜜桃 | 久久国产人妻一区二区免费 | 亚洲性生活视频 | 国产高清999| 粗大的内捧猛烈进出少妇 | 亚洲精品视屏 | 精品国产网| 色翁荡熄又大又硬又粗又 | 最新版天堂资源网在线种子 | 少妇高潮大片免费观看 | 日韩午夜理论免费tv影院 | 一本久在线 | 国内一区二区三区 | 欧美精品一国产成人综合久久 | 琪琪午夜理论片福利在线观看 | 久久久精品小视频 | 亚洲制服丝袜av一区二区三区 | 亚洲国产精品久久网午夜 | 婷婷国产天堂久久综合五月 | 无码人妻精品一区二区在线视频 | 无码精品久久一区二区三区 | 欧美人禽杂交狂配 | 欧美黄一级 | 日日摸日日碰夜夜爽无 | 97香蕉超级碰碰碰久久兔费 | 国产欧美一级 | 久久久久久无码午夜精品直播 | 黑人粗硬进入过程视频 | 国产超碰人人爽人人做av | 亚洲精品久久久久中文字幕二区 | 起碰97在线视频国产 | 色先锋影音岛国av资源 | 午夜精品福利视频 | 久久av喷潮久久av高清 | 亚洲视频在线免费观看 | 亚洲精品国产成人99久久 | 日本一区二区三区精品 | 日本激情久久 | 麻豆av免费入口 | 免费看美女部位隐私网站 | 久久综合九色综合国产 | 毛片国产精品 | 不卡中文一二三区 | 小毛片 | 夜精品a片一区二区三区无码白浆 | 97人妻碰碰视频免费上线 | 亚洲成年av天堂动漫网站 | 精品人妻码一区二区三区 | 亚洲va欧美va人人爽午夜 | 一边摸一边叫床一边爽av免费 | 91精品国产成人 | 久久蜜桃av一区精品变态类天堂 | 国产av麻豆天堂亚洲国产av刚刚碰 | 无码网站天天爽免费看视频 | 欧美中文字幕在线 | 无码中文字幕人妻在线一区 | 中文无码精品a∨在线观看不卡 | 精品视频一二区 | 亚洲午夜高清国产拍 | 制服丝袜天堂网 | 凹凸日日摸日日碰夜夜爽1 欧美国产在线视频 | 中国少妇xxxxxx做受 | www无套内射高清免费 | 啪一啪射一射插一插 | pt美日韩欧pt网 | 中文字幕精品亚洲字幕资源网 | 99久久免费看少妇高潮a片特黄 | 国产精品国产三级国av在线观看 | 国产精品18久久久久久麻辣 | 日本少妇aa特黄毛片亚洲 | 吃奶呻吟张开双腿做受在线播放 | 色视频在线观看视频 | 午夜成人亚洲理论片在线观看 | 色94色欧美sute亚洲线路一 | 无码日韩人妻精品久久蜜桃 | 国产资源第一页 | 亚洲午夜精品久久久久久久久久久久 | 中文字幕第一页永久有效 | 少妇扒开粉嫩小泬视频 | 欧美丰满熟妇xxxx | 日韩成人午夜影院 | 手机看片国产av无码 | 国产乱了伦视频大全亚琴影院 | 日韩精品一区二 |