一、双网卡网络共享
具体描述:服务器eth0连接外网,eth1连接笔记本,笔记本能够上网。
i. A two-net card network sharing
with a specific description: server eth0 connected to the extranet, eth1 connected to the notebook, which is available online.
操作步骤
修改网卡信息
外网
Operation step
Modify Netcard Info
Extranet
内网
Intranet
Linux系统启用端口转发(NAT)功能
Linux allows port forwarding (NT) functions
修改防火墙设置,将网卡eth1改成trusted区域:
Modify firewall settings to replace Netcath1 with a trusted area:
配置 NAT 规则:将所有发送到192.168.100.*的数据包转发到eth0(外网网卡)
Configure NT Rule: Forward all data packages sent to 192.168.100.* to eth0 (outline card)
允许端口转发,执行命令
Allow port forwarding. Execute command.
配置连接内网的主机ip信息
Configure hostip information for connection to the Intranet
shell脚本
shell script
share-eth.sh
trans.sh
注意:执行shell脚本方式配置的话,执行完share-eth.sh之后还需再执行一次trans.sh
当eth0和eth1处于同一个网段的时候会出现什么情况?
Note: What happens when Eth0 and Eth1 are in the same section?
这时连接的主机的ip也和它们处于同一网段,相互之间并不连通。
The ips of the connected mainframe are also in the same section of the network and are not connected to each other.
怎么解决?
How?
服务器网卡信息:
Cannot initialise Evolution's mail component.
连接的主机:
Host of connection:
解决方法:将连接的主机ip加入服务器的路由表
Solution: Add the connected hostip to the server's route list
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论