<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>dwt&#039;s life - 网络</title>
<link>https://dwt.life/tag/%E7%BD%91%E7%BB%9C/</link>
<atom:link href="https://dwt.life/feed/tag/%E7%BD%91%E7%BB%9C/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Fri, 29 Oct 2021 16:22:00 +0800</lastBuildDate>
<pubDate>Fri, 29 Oct 2021 16:22:00 +0800</pubDate>
<item>
<title>Wireguard+iptables实现网络层的转发</title>
<link>https://dwt.life/archives/141/</link>
<guid>https://dwt.life/archives/141/</guid>
<pubDate>Fri, 29 Oct 2021 16:22:00 +0800</pubDate>
<dc:creator>Ricky</dc:creator>
<description><![CDATA[使用wireguard组网首先我们要在两台机器间建立一个虚拟局域网（除了wireguard，zerotier之类的软件也是可以的），先在本地与远程两台机器上安装wireguard，并生成密钥。a...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<h1>使用wireguard组网</h1><p>首先我们要在两台机器间建立一个虚拟局域网（除了wireguard，zerotier之类的软件也是可以的），先在本地与远程两台机器上安装wireguard，并生成密钥。</p><pre><code>apt install wireguard
wg genkey  | tee privatekey | wg pubkey &gt; publickey</code></pre><p>在 /etc/wireguard/ 下创建配置文件 wg.conf:</p><p>在具有公网ip的服务器上配置如下:</p><pre><code>[Interface]
# 客户端连接的端口
ListenPort = 16000 
# 虚拟局域网中的ip
Address = 10.0.0.1/24  
# 填上之前生成的私钥
PrivateKey = $PRIVATEKEY   
# 下面两条是放行的iptables和MASQUERADE
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
# 无公网ip的服务器设置
[Peer]
# 无公网ip的服务器公钥
PublicKey = $PUBLICKEY 
AllowedIPs = 10.0.0.2/32</code></pre><p><strong>另外修改 /etc/sysctl.conf 添加 <em>net.ipv4.ip_forward = 1</em> 执行 <code>sysctl -p</code> 开启转发。</strong></p><p>在没有公网ip的服务器上配置如下</p><pre><code>[Interface]
# 虚拟局域网中的ip
Address = 10.0.0.2/24
# 客户端私钥
PrivateKey = CLIENTA_PRIVATE_KEY
# MTU（可选）
# MTU = 1420
# 监听端口（可选）
# ListenPort = 

[Peer]
# Server
# Server 公钥
PublicKey = SERVER_PUBLICKEY
# Server IP:Port
Endpoint = 1.2.3.4:16000
# 通过 wireguard传输的 IP 列表
AllowedIPs = 10.0.0.0/24
# 强烈建议开启定期握手，不然远程服务器可能没办法主动连接上本地机器
PersistentKeepalive = 20
</code></pre><p>之后启动wireguard</p><pre><code>wg-quick up wg
# 或者 
systemctl start wg-quick@wg
</code></pre><p>另外，如果使用的是境外的机器用于转发，普通的udp跨境速度感人，Hysteria可以加速连接，并且隐藏wireguard的特征，但是relay_udp模式貌似存在一些问题，在我的测试中都没有速度,感兴趣的可以查看一下这篇文章使用Hysteria进行双边加速…国内的机器则不用太担心这点(除非机房限制了udp)。</p><h1>实现流量转发</h1><p>在组建了虚拟局域网之后我们就可以对流量进行转发了。下面两种情况要分开考虑:</p><ul><li>远程服务器有多个公网ip(双栈也可以)</li><li>远程服务器只有一个公网ip</li></ul><h2>多ip服务器的转发</h2><p>假设网络环境如下</p><p>远程服务器有双ip(双栈也可以) 1.1.1.1和2.2.2.2，虚拟局域网中的ip为10.0.0.1，本地机器只有局域网ip，虚拟局域网中的ip为10.0.0.2。我们需要将2.2.2.2给本地的机器使用，</p><p>本地的服务器使用1.1.1.1和远程服务器建立wg连接，之后的流程如下:</p><ul><li>外部流量到 2.2.2.2</li><li>iptables修改目的ip为 10.0.0.2</li><li>路由到wg虚拟网卡进行处理</li><li>经过wireguard到达本地</li><li>响应请求</li><li>经过wg虚拟网卡到达远程服务器</li><li>iptables 修改源ip为2.2.2.2</li></ul><p>我使用justhost来测试，他家创建服务器的时候就算选择了多个ip，但是创建出来只绑定了一个ip，所以我们还需要进行配置。</p><p>两个公网ip为:</p><ul><li>45.89.228.209 用于建立wireguard连接 （双栈服务器可以使用ipv6来建立连接）</li><li>45.130.146.230 分配给本地使用<br>修改 <code>/etc/netplan/50-cloud-init.yaml</code> （Ubuntu18之后的配置文件，之前的版本为network/interfaces）</li></ul><pre><code># network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - 45.89.228.209/23
            - 45.130.146.230/23
            - 2a00:b700:2::7:156/64
            gateway4: 45.89.228.1
            gateway6: 2a00:b700:2::1
            match:
                macaddress: 5e:e7:6c:db:9f:83
            nameservers:
                addresses:
                - 77.88.8.8
                - 77.88.8.1
                - 2a00:b700::220
                - 2a00:b700:1::220
                search:
                - justhost.ru
            set-name: eth0
</code></pre><p>之后使用 <code>netplan apply</code> 应用配置，应用之后尝试 <code>ping 45.130.146.230</code> 已经可以获得回应了，但是有一个很奇怪的问题，我用 <code>ifconfig</code> 还是无法看见新分配的ip，但是使用 <code>ip addr</code> 是可以看见的。</p><p><img src="https://pic.8oh.com.cn/cos/2021/10/29/6770aa562abc7_1635495205.png" alt="1635495203528.png" title="1635495203528.png"></p><p><strong>分配好ip后，我们尝试将新分配到的45.130.146.230分配给本地的服务器使用。为了使连接不受影响，我们需要修改本地wireguard配置文件中对应peer的endpoint，使用45.89.228.209:16000来建立连接。</strong></p><p><img src="https://pic.8oh.com.cn/cos/2021/10/29/2318bd8460248_1635495234.png" alt="1635495233049.png" title="1635495233049.png"></p><p>在虚拟局域网中ip如下:</p><p>10.0.0.2: 本地的服务器ip</p><p>10.0.0.10: 远程的服务器ip</p><p>之后我们需要在远程服务器上使用iptables进行一些修改 这两条命令也可以写到wireguard的postup和postdown参数中。</p><pre><code># 首先需要实现将目的ip为45.130.146.230的数据包修改目的地址为10.0.0.2
iptables -t nat -I PREROUTING -d 45.130.146.230 -j DNAT --to-destination 10.0.0.2
# 因为wireguard修改了路由表,所以之后目的地址为10.0.0.2的数据包就会转发至10.0.0.2
# 另外需要将10.0.0.2的响应请求，源ip修改为 45.130.146.230
iptables -t nat -I POSTROUTING -s 10.0.0.2 -j SNAT --to-source 45.130.146.230
# 另外，数据包经过wg的时候被改写了源ip(变成10.0.010)，这样会导致无法正常响应</code></pre><p>服务端修改成这样后，就可以了，但是还有一个问题需要处理，此时在远程服务器上对wg接口抓包，这时是可以看见 xxx.xxx.xxx.xxx(来自公网的ip) -&gt; 10.0.0.2 的icmp数据包的，但是在本地的服务器上对wg接口抓包，什么都看不见。</p><p>原因是本地的wg配置文件中只设置了 AllowedIPs = 10.0.0.0/24，也就是说只允许源ip和目的ip为10.0.0.0/24在wg上进行传输。</p><p>虽然设置成0.0.0.0/0，可以允许所有的包经过wg进行传输，但是本地的所有请求也会经过wireguard进行传输，但如果我们只希望本地服务器的被动响应走wg，而主动连接不经过wg，那么还需要再客户端上进行一些设置。</p><p>修改本地机器的 wg.conf,在[Interface]中添加如下字段</p><pre><code>Table = 1
PostUp = ip rule add from 10.0.0.2 table 1; ip rule add to 10.0.0.0/24 table 1
PostDown = ip rule del from 10.0.0.2 table 1; ip rule add to 10.0.0.0/24 table 1</code></pre><p>加上上面的字段后，wireguard会新建一个路由表，而不是直接在主路由表上进行修改，然后我们只需要让来自于wg的请求以及目的ip是虚拟局域网中的地址的请求根据这个表进行路由，而本地主动发出的请求根据主路由表路由，即可实现上面需要的功能。</p><p>然后执行 <code>systemctl restart wg-quick@wg</code> 重启wireguard即可。 可以看见延迟发生了变化</p><p><img src="https://pic.8oh.com.cn/cos/2021/10/29/deec4ba43d9c1_1635495327.png" alt="1635495325675.png" title="1635495325675.png"></p><p><img src="https://pic.8oh.com.cn/cos/2021/10/29/4200ef724e0d0_1635495341.png" alt="1635495339501.png" title="1635495339501.png"></p><h2>单ip服务器的转发</h2><p>其实单ip服务器的转发也很简单，<strong>唯一的一点不同就是SNAT和DNAT的时候，需要忽略几个端口</strong>，比如需要忽略目的端口是wireguard监听端口(16000)的请求，如果我们还想要连接到用于中转的服务器，那么还需要忽略22端口。</p><p>单ip服务器转发使用腾讯云的机器进行，几家大厂的服务器都有个特点——网卡没有直接绑定公网ip。在建立好了虚拟局域网之后，我们要设置下面的转发规则: (multiport模块不支持 -p all参数)</p><pre><code>iptables -t nat -I PREROUTING -d 127.0.0.1 -p tcp -m multiport ! --dports 22,16000 -j DNAT --to-destination 10.0.0.2
iptables -t nat -I PREROUTING -d 127.0.0.1 -p udp -m multiport ! --dports 22,16000 -j DNAT --to-destination 10.0.0.2

iptables -t nat -I POSTROUTING -s 10.0.0.2 -j SNAT --to-source 127.0.0.1</code></pre><p>之后的在本地服务器上进行的设置和多ip服务器的设置一样，就不赘述了。</p><h2>Docker中的使用</h2><p>我在使用这种方式给将发往远程服务器的请求全部转发给本地之后发现了一个问题——docker容器在启动时如果是通过 -p 参数指定的映射端口，访问远程ip的对应端口发现的不到响应(如果使用的是–net host 模式，那么不需要再进行额外设置)，在服务器上抓包，发现docker中是收到了对应的数据包的，响应的数据包的目的地址是访问者的IP，而在没有设置路由规则的情况下，这些包是由主网卡eth0发出的，而不会走wg网卡，那么自然无法顺利建立连接了，我的解决方法是用ip route指定源地址为docker中地址的数据包根据table 1进行路由。</p><pre><code>PostUp = ip rule add from 10.0.1.2 table 1; ip rule add to 10.0.1.1/32 table 1; ip rule add from 172.18.0.2/32 table 1; # 可以指定为某一确定容器的ip
PostDown = ip rule del from 10.0.1.2 table 1; ip rule del to 10.0.1.1/32 table 1; ip rule del from 172.18.0.2/32 table 1;</code></pre><p>按照我上面的wg配置文件的写法，所有源ip为docker0的网络范围的数据包都会经过table1通过wireguard进行路由，这时再访问公网ip，已经可以访问到我们docker中的服务了。</p><h1>我使用的配置文件</h1><ul><li>本地服务器</li></ul><pre><code>[Interface]
# 虚拟局域网内的
Address = 10.0.0.2/24
# 客户端私钥
PrivateKey = privatekey
Table = 1
PostUp = ip rule add from 10.0.0.2 table 1; ip rule add to 10.0.0.0/24 table 1
PostDown = ip rule del from 10.0.0.2 table 1; ip rule del to 10.0.0.0/24 table 1
[Peer]
PublicKey = publickey1
Endpoint = x.x.x.x:16000
AllowedIPs = 10.0.0.1/32, 0.0.0.0/0
PersistentKeepalive = 20
[Peer]
PublicKey = publickey2
Endpoint = x.x.x.x:16000
AllowedIPs = 10.0.0.10/32
PersistentKeepalive = 20</code></pre><ul><li>多ip服务器</li></ul><pre><code>[Interface]
# 客户端连接的端口
ListenPort = 16000
Address = 10.0.0.10/24
# 填上之前生成的私钥
PrivateKey = privatekey
# 下面两条是放行的iptables和MASQUERADE
PostUp = iptables -t nat -I PREROUTING -d 45.130.146.230 -j DNAT --to-destination 10.0.0.2; iptables -t nat -I POSTROUTING -s 10.0.0.2 -j SNAT --to-source 45.130.146.230;
PostDown = iptables -t nat -D PREROUTING -d 45.130.146.230 -j DNAT --to-destination 10.0.0.2; iptables -t nat -D POSTROUTING -s 10.0.0.2 -j SNAT --to-source 45.130.146.230
[Peer]
PublicKey = publickey
AllowedIPs = 10.0.0.2/32</code></pre><ul><li>单ip服务器</li></ul><p>腾讯云等大厂的服务器绑定的一般都是内网ip，而非公网ip，这里是10.0.4.5</p><pre><code>[Interface]
# 客户端连接的端口
ListenPort = 16000
Address = 10.0.0.1/24
# 填上之前生成的私钥
PrivateKey = privatekey

PostUp = iptables -t nat -A PREROUTING -d 10.0.4.5 -p tcp -m multiport --dports 22,16000 -j ACCEPT; iptables -t nat -A PREROUTING -d 10.0.4.5 -p udp -m multiport --dports 22,16000 -j ACCEPT; iptables -t nat -A PREROUTING -d 10.0.4.5 -j DNAT --to-destination 10.0.0.2; iptables -t nat -A POSTROUTING -s 10.0.0.2 -j SNAT --to-source 10.0.4.5;

PostDown = iptables -t nat -D PREROUTING -d 10.0.4.5 -p tcp -m multiport --dports 22,16000 -j ACCEPT; iptables -t nat -D PREROUTING -d 10.0.4.5 -p udp -m multiport --dports 22,16000 -j ACCEPT; iptables -t nat -D PREROUTING -d 10.0.4.5 -j DNAT --to-destination 10.0.0.2; iptables -t nat -D POSTROUTING -s 10.0.0.2 -j SNAT --to-source 10.0.4.5;
# 无公网ip的服务器设置
[Peer]
# 无公网ip的服务器公钥
PublicKey = publickey
AllowedIPs = 10.0.0.2/32</code></pre><h1>参考</h1><p><a href="https://fuckcloudnative.io/posts/wireguard-docs-practice/#-dns">https://fuckcloudnative.io/posts/wireguard-docs-practice/#-dns</a></p><p><a href="https://www.cnblogs.com/wanstack/p/7728785.html">https://www.cnblogs.com/wanstack/p/7728785.html</a></p><p><a href="https://www.liuvv.com/p/a8480986.html">https://www.liuvv.com/p/a8480986.html</a></p><p>本文转载自<a href="https://aoyouer.com/posts/wireguard-l3-forward/">https://aoyouer.com/posts/wireguard-l3-forward/</a><br>过程写的很清楚，忘记dports参数了，找到这篇文章又想起来了.<br>本文的wireguard是一种方案，n2n也是一种方案，开头的zerotier也是。不过没办法在n2n内配置开启关闭时执行的脚本。</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://dwt.life/archives/141/#comments</comments>
<wfw:commentRss>https://dwt.life/feed/tag/%E7%BD%91%E7%BB%9C/</wfw:commentRss>
</item>
<item>
<title>centos设置WiFi的country code</title>
<link>https://dwt.life/archives/134/</link>
<guid>https://dwt.life/archives/134/</guid>
<pubDate>Wed, 22 Sep 2021 23:26:31 +0800</pubDate>
<dc:creator>Ricky</dc:creator>
<description><![CDATA[国内WiFi 5G频段在其他或者全球默认范围内不存在，所以需要设置country code以允许设备搜索指定范围信道。yum install crdasetregdomain CNiw reg ...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>国内WiFi 5G频段在其他或者全球默认范围内不存在，所以需要设置country code以允许设备搜索指定范围信道。</p><pre><code>yum install crda
setregdomain CN
iw reg get</code></pre><p>然后就可以<code>nmtui</code>管理了。</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://dwt.life/archives/134/#comments</comments>
<wfw:commentRss>https://dwt.life/feed/tag/%E7%BD%91%E7%BB%9C/</wfw:commentRss>
</item>
<item>
<title>linux系统单网卡绑定多个IP地址</title>
<link>https://dwt.life/archives/127/</link>
<guid>https://dwt.life/archives/127/</guid>
<pubDate>Sat, 21 Aug 2021 13:18:00 +0800</pubDate>
<dc:creator>Ricky</dc:creator>
<description><![CDATA[说明：单网卡绑定两个IP地址，电信和联通，目的：是为了当电信出故障联通正常使用。系 统IP地址子网掩码网关CentOS 6.3_64biteth0:116.18.176.19255.255.25...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>说明：</p><p>单网卡绑定两个IP地址，电信和联通，目的：是为了当电信出故障联通正常使用。</p><p>系 统</p><p>IP地址</p><p>子网掩码</p><p>网关</p><p>CentOS 6.3_64bit</p><p>eth0:116.18.176.19</p><p>255.255.255.0</p><p>192.168.1.1</p><p>eth0:0:172.188.174.20</p><p>255.255.255.0</p><p>192.168.1.1</p><p>…</p><p>…</p><p>…</p><p>1、linux的网络设备的存储路径是/etc/sysconfig/network-scripts进入目录：</p><pre><code>[root@localhost ~]# cd /etc/sysconfig/network-scripts/

[root@localhost network-scripts]# ll

total 196

-rw-r--r--. 1 root root   212 Mar 20 22:15 ifcfg-eth0</code></pre><p>　</p><p>2、在/etc/sysconfig/network-scripts 目录上创建一个ifcfg-eth0:x(x可以为0,1,2.......)。<br>为了简便我们可以讲ifcfg-eth0,复制一份命名为ifcfg-eth0:0即可，然后修改配置文件。　　</p><pre><code>[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-eth0:0</code></pre><p>　　</p><p>3、编辑ifcfg-eth0:0 虚拟IP</p><pre><code>[root@localhost network-scripts]# vim ifcfg-eth0:0

DEVICE=&quot;eth0:0&quot;            //修改设备的名称

BOOTPROTO=&quot;static&quot;       //[none|static|bootp|dhcp]（引导时不使用协议|静态分
配|BOOTP协议|DHCP协议）

IPADDR=172.188.174.20         //修改IP地址

NETMASK=255.255.255.0      //子网掩码

GATEWAY=192.168.1.1        //网关

BROADCAST=&#039;192.168.1.255&#039;    //广播地址

HWADDR=&quot;00:0C:29:C9:6D:11&quot;  //MAC地址

NM_CONTROLLED=&quot;yes&quot;

ONBOOT=&quot;yes&quot;               //开机激活

:wq</code></pre><p>如果需要再绑定多一个IP地址，只需要把文件名和文件内的DEVICE中的eth0:x加一即可。　</p><p>4、配置网卡DNS（电信和联通）</p><p>配置文件在/etc/resolv.conf下面。</p><pre><code>vim /etc/resolv.conf

nameserver 202.109.14.5           #主DNS

nameserver 219.141.136.10         #次DNS</code></pre><p>保存退出，然后运行如下的命令，重启虚拟的网卡。</p><pre><code>[root@localhost network-scripts]# service network restart或/etc/init.d/network restart</code></pre><p>5、我们来查看我们虚拟的网卡是不是激活了，用ifconfig,也就是下面这样的。</p><pre><code>[root@localhost network-scripts]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:C9:6D:18 

          inet addr:116.18.176.19  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fec9:6d18/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1622 errors:0 dropped:0 overruns:0 frame:0

          TX packets:702 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:170181 (166.1 KiB)  TX bytes:122357 (119.4 KiB)

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:C9:6D:18 

          inet addr:172.188.174.20  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  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:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)</code></pre><p>6、下面测试一下，另外一台计算机使用ping来测试</p><p>C:\Users\Administrator&gt;ping 116.18.176.19</p><p>正在 Ping 116.18.176.19 具有 32 字节的数据:</p><p>来自 116.18.176.19 的回复: 字节=32 时间=16ms TTL=64</p><p>来自 116.18.176.19 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 116.18.176.19 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 116.18.176.19 的回复: 字节=32 时间=8ms TTL=255</p><p>C:\Users\Administrator&gt;ping 172.188.174.20</p><p>正在 Ping 172.188.174.20 具有 32 字节的数据:</p><p>来自 172.188.174.20 的回复: 字节=32 时间=16ms TTL=64</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>测试成功！</p><p>7、测试当eth0 网络中断eth0:0是否正常使用</p><p>C:\Users\Administrator&gt;ping 116.18.176.19</p><p>正在 Ping 116.18.176.19 具有 32 字节的数据:</p><p>请求超时。</p><p>请求超时。</p><p>请求超时。</p><p>来自 192.168.1.2 的回复: 无法访问目标主机。</p><p>C:\Users\Administrator&gt;ping 172.188.174.20</p><p>正在 Ping 172.188.174.20 具有 32 字节的数据:</p><p>来自 172.188.174.20 的回复: 字节=32 时间=16ms TTL=64</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>来自 172.188.174.20 的回复: 字节=32 时间=8ms TTL=255</p><p>测试成功！</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://dwt.life/archives/127/#comments</comments>
<wfw:commentRss>https://dwt.life/feed/tag/%E7%BD%91%E7%BB%9C/</wfw:commentRss>
</item>
<item>
<title>libvirt创建私网</title>
<link>https://dwt.life/archives/91/</link>
<guid>https://dwt.life/archives/91/</guid>
<pubDate>Sat, 31 Jul 2021 23:51:21 +0800</pubDate>
<dc:creator>Ricky</dc:creator>
<description><![CDATA[&lt;network&gt;  &lt;name&gt;private&lt;/name&gt;  &lt;bridge name=&quot;virbr2&quot;/&gt;  &lt;i...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<pre><code>&lt;network&gt;
  &lt;name&gt;private&lt;/name&gt;
  &lt;bridge name=&quot;virbr2&quot;/&gt;
  &lt;ip address=&quot;10.10.0.1&quot; netmask=&quot;255.255.255.0&quot;&gt;
    &lt;dhcp&gt;
      &lt;range start=&quot;10.10.0.2&quot; end=&quot;10.10.0.254&quot;/&gt;
    &lt;/dhcp&gt;
  &lt;/ip&gt;
  &lt;ip family=&quot;ipv6&quot; address=&quot;2001:db8:ca2:3::1&quot; prefix=&quot;64&quot;/&gt;
&lt;/network&gt;</code></pre>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://dwt.life/archives/91/#comments</comments>
<wfw:commentRss>https://dwt.life/feed/tag/%E7%BD%91%E7%BB%9C/</wfw:commentRss>
</item>
</channel>
</rss>