- 论坛徽章:
- 0
|
10可用积分
如何要在LINUX让防火墙开放ftp和samba端口呢?
我是这样写的
iptables -A INPUT -p tcp --sport ftp -j ACCEPT
iptables -A INPUT -p tcp --sport 546 -j ACCEPT
iptables -A INPUT -p tcp --sport 547 -j ACCEPT
是不是需要把3个表都写满呢?
我这边的环境还是有新的一张表的.是别人建的.
iptables -L结果是这样的
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT udp -- anywhere anywhere udp dpt:2198
ACCEPT udp -- anywhere anywhere udp dpt:2199
ACCEPT udp -- anywhere anywhere udp dpt:2200
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:webcache
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:1099
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
tcp -- anywhere anywhere tcp spt:ftp
ACCEPT tcp -- anywhere anywhere tcp spt:ftp
ACCEPT tcp -- anywhere anywhere tcp spt:dhcpv6-client
ACCEPT tcp -- anywhere anywhere tcp spt:dhcpv6-server
tcp -- anywhere anywhere tcp spt:dhcpv6-client
ACCEPT tcp -- anywhere anywhere tcp spt:dhcpv6-client
ACCEPT tcp -- anywhere anywhere tcp spt:dhcpv6-server
ACCEPT udp -- anywhere anywhere udp spt:dhcpv6-client
ACCEPT udp -- anywhere anywhere udp spt:dhcpv6-server
我想请问各位大虾我要怎样改呢? |
|