我想创build一个规则,允许eth1上的任何人访问端口80. UFW可以这样做,还是应该回到使用Shorewall?
澄清:这是一个能力问题,可以把接口作为目标吗?
我终于看了手册页:
By default, ufw will apply rules to all available interfaces. To limit this, specify DIRECTION on INTERFACE, where DIRECTION is one of in or out (interface aliases are not supported). For example, to allow all new incoming http connections on eth0, use: ufw allow in on eth0 to any port 80 proto tcp
详细一点答案是肯定的,ufw可以使用这个接口作为目标。 我的特定规则是这样的:
ufw allow in on eth1 to [eth1 ip addr] port 80 proto tcp
是的,如果eth1只是一个具有自己IP地址的正常接口(并且该IP地址就是您想要访问的内容):
ufw allow from any to [eth1 ip addr] port 80
但是,如果还有比这更复杂的事情,那么我们需要更多关于这个系统如何build立的信息。