【发布时间】:2014-03-15 06:43:08
【问题描述】:
我目前正在尝试将 iptables 配置为仅允许某些 mac 地址连接到端口:3690 (svn)。 第 1 步 - 在 EC2 管理控制台 > 安全组(组名:默认)上,我为所有子网打开了端口:3690。 第 2 步 - 在我的 linux 服务器(Amazon Linux AMI 64 位)上,我配置了 iptables: 2.1 允许我的mac地址(端口3690) 2.2 全部丢弃(3690端口)
[ec2-user@ip-172-31-7-2 ~]$ sudo iptables -n -L -v --line-numbers
Chain INPUT (policy ACCEPT 1974 packets, 206K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3690 MAC 50:46:5D:C7:63:C1
2 5 272 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3690
但是防火墙不能正常工作。我无法从 mac 地址远程登录端口 3690。如果我删除 iptables,所有客户端都可以访问此端口。 谁能帮帮我???
【问题讨论】:
标签: amazon-web-services amazon-ec2 iptables mac-address