由 feilong 在 11-10-2003 13:14 发表:
关于端口映射的求救!!!急!
本人有一个基于win2000运行的程序,现在挂在局域网内部的计算机上,而这个程序的运行只需要8011端口既可以,我们单位现在采用的是LINUX做网关服务器,请教各位高手,能通过端口映射可以实现外部程序访问局域网内部的这个端口么?(这个基于win2000运行的程序本身已经成熟,只要开放8011端口就可以。现在就困难外部的无法访问。)。
由 zsk2000 在 11-10-2003 13:36 发表:
可以的!只要隐射8011的就可以了!linux做双网卡!上面做隐射就可以了!
由 feilong 在 11-10-2003 13:47 发表:
我试验过了!但是出现一个错误,望兄台帮忙!
我用的命令是:iptables -t nat -A PREROUTING -d 172.16.70.1 -p tcp -dport 8011 -j DNAT --to 192.168.0.9
iptables -t nat -A POSTROUTING -d 192.168.0.9 -p tcp -dport 8011 -j SNAT --to 192.168.0.1
服务器双网卡,外部iP地址为172.16.70.1,内部ip为192.168.0.1,192.168.0.9是我想映射的计算机。但是当我是用命令时,告诉我multipta -d 错误,好像是-d这个参数无法使用,望高手指点,我在那里用错了。谢谢!!!!
由 Snoopy 在 11-10-2003 13:50 发表:
win2000成熟?
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
由 r2007 在 11-10-2003 14:42 发表:
回复: 我试验过了!但是出现一个错误,望兄台帮忙!
> quote:
>
> * * *
>
> 最初由 feilong 发表
>
> **我用的命令是:iptables -t nat -A PREROUTING -d 172.16.70.1 -p tcp -dport 8011 -j DNAT --to 192.168.0.9
>
> iptables -t nat -A POSTROUTING -d 192.168.0.9 -p tcp -dport 8011 -j SNAT --to 192.168.0.1
>
> 服务器双网卡,外部iP地址为172.16.70.1,内部ip为192.168.0.1,192.168.0.9是我想映射的计算机。但是当我是用命令时,告诉我multipta -d 错误,好像是-d这个参数无法使用,望高手指点,我在那里用错了。谢谢!!!! **
>
> * * *
-dport 改为 --dport
由 Snoopy 在 11-10-2003 14:45 发表:
-dport --dport这两个分别在哪啊?
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
由 r2007 在 11-10-2003 15:15 发表:
> quote:
>
> * * *
>
> 最初由 pinksnoopy 发表
>
> -dport --dport这两个分别在哪啊?
>
> * * *
-dport 错误参数
--dport 正确参数
由 feilong 在 11-11-2003 08:40 发表:
谢谢
楼上的兄台,问题已经解决,谢谢!
由 Snoopy 在 11-11-2003 08:52 发表:
**** <