由 Snoopy 在 11-11-2003 11:37 发表:
iptables错在哪里啊?`
当别人访问我21端口时,转到外部某个ip的22端口去?
怎么写啊???
iptables?-t?nat?-A?PREROUTING?-p?tcp?-s?xx.xx.xx.xx?-dport?21?-j?DNAT?xx.xx.xx.xx:22
怎么不行啊???自己端口都不会打开,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 大熊宝宝 在 11-11-2003 11:54 发表:
iptables -t nat -A PREROUTING -p tcp -d xx.xx.xx.xx --dport 21 -j DNAT --to-destination xxx.xxxx.xxxx.xxxx:21
请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.
新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了
由 Snoopy 在 11-14-2003 14:38 发表:
> quote:
>
> * * *
>
> 最初由 大熊宝宝 发表
>
> iptables -t nat -A PREROUTING -p tcp -d xx.xx.xx.xx --dport 21 -j DNAT --to-destination xxx.xxxx.xxxx.xxxx:21
>
> * * *
也不行,,别人连接我时不会转到外部ip去啊,
而且我自己的21端口也不会开!!
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 大熊宝宝 在 11-14-2003 14:50 发表:
还有一个20端口
请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.
新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了
由 Snoopy 在 11-14-2003 16:20 发表:
还是不行啊,,宝宝,,上次我转过一次,,那次是80的,
那找来的例子我不小心删了,,,记得上次打那规则下去80端口会自动开起来的
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 大熊宝宝 在 11-15-2003 01:03 发表:
不要用 -d 试一下
请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.
新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了
由 viento 在 11-15-2003 03:37 发表:
#这一步实现局域网内部机对外部网开放
#凡对$STATIC_IP:80连线者,则转址到192.168.0.100:80
iptables -t nat -A PREROUTING -d 81.33.20.80 -p tcp --dport 80 -j DNAT --to-destination 192.168.0.100:80
iptables -A FORWARD -p tcp -d 192.168.0.100 --dport 80 -j ACCEPT
iptables -t nat -I POSTROUTING -s 192.168.0.0/255.255.255.0 -p tcp -d 192.168.0.100 --dport 80 -j SNAT --to 192.168.0.1
#192.168.0.250装有win2003,提供远程桌面服务
iptables -t nat -A PREROUTING -d 81.33.20.80 -p tcp --dport 3389 -j DNAT --to-destination 192.168.0.250:3389
iptables -A FORWARD -p tcp -d 192.168.0.250 --dport 3389 -j ACCEPT
#允许内网机使用外网机的IP访问内网机,把内网机的IP转换成网关IP
iptables -t nat -I POSTROUTING -s 192.168.0.0/255.255.255.0 -p tcp -d 192.168.0.250 --dport 3389 -j SNAT --to 192.168.0.1
这是我的iptables,可参考。
由 Snoopy 在 11-15-2003 13:55 发表:
都试了,,转不了,,,而且端口也没开,,,,
是不是我的iptables出现问题??我的其他规则都很正常啊?
上面的例子怎么打端口死都不开,,,到底怎么弄啊??急啊,,,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 大熊宝宝 在 11-15-2003 14:34 发表:
我就这样 没有问题阿 你的怎么会这样呢
请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.
新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了
由 Snoopy 在 11-15-2003 15:15 发表:
照例子打,也没出现错误信息,而且其他规则正确的在使用中,
就是我要转发的那个端口死都不会开起来,,,我用的是RH AS 3
怎么办,宝宝,有没办法找找出错问题在哪里啊???
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 Snoopy 在 11-15-2003 15:34 发表:
[root@Snoopy Iptables]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain block (0 references)
target prot opt source destination
Chain icmpfilter (0 references)
target prot opt source destination
Chain nat (0 references)
target prot opt source destination
我一查看,都没查看到规则啊,,,很多都不懂为什么!!
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 大熊宝宝 在 11-15-2003 15:41 发表:
iptables --list 发上来 还要 你AS上FTP服务开着吗
请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.
新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了
由 Snoopy 在 11-15-2003 15:59 发表:
[root@Snoopy pink]# nmap snoopy
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
All 1601 scanned ports on Snoopy (127.0.0.1) are: closed
Nmap run completed -- 1 IP address (1 host up) scanned in 3 seconds
[root@Snoopy pink]# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain block (0 references)
target prot opt source destination
Chain icmpfilter (0 references)
target prot opt source destination
Chain nat (0 references)
target prot opt source destination
ftp关了,,,iptables之前的东西F掉后打上面的例子都没反应的,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the s