小编nho*_*rst的帖子

我的服务器不在接口之间转发数据包。我错过了什么?

我想让我的 Ubuntu 11.04 服务器在它的两个网络接口之间路由数据包。

两个以太网接口(eth0、eth1)显然工作得很好。两者都有静态 IP 地址(192.168.2.15 和 192.168.3.15),并且都可以从各自的网络访问。所有 IP 服务以及 Samba 服务器都可以从双方访问。

sysctl -p 返回“net.ipv4.ip_forward=1”,我什至可以从两个网络“另一端”ping 接口。换句话说:我可以从 192.168.3.0 网络上的所有 PC 上 ping 192.168.2.15,从 192.168.2.0 网络上的所有系统上 ping 192.168.3.15。但我无法到达相应“另一边”的任何其他地址

我已经阅读了许多关于将 Ubuntu 设置为路由器的主题的“如何”文章和论坛主题,但我只是没有找到解决问题的最终方法。

这里还有一些关于设置的更多信息。

内核IP路由表显示:

Destination Gateway     Genmask     Flags   Metric  Ref Use Iface
default 192.168.3.1 0.0.0.0     UG  100 0   0   eth0
192.168.2.0 *       255.255.255.0   U   0   0   0   eth1
192.168.3.0 *       255.255.255.0   U   0   0   0   eth0
Run Code Online (Sandbox Code Playgroud)

界面显示:

iface eth0 inet static
    address 192.168.3.15
    netmask 255.255.255.0
    broadcast 192.168.3.255
    network 192.168.3.0
    gateway 192.168.3.1


iface …
Run Code Online (Sandbox Code Playgroud)

server routing ethernet router

5
推荐指数
1
解决办法
1658
查看次数

标签 统计

ethernet ×1

router ×1

routing ×1

server ×1