由 suyizhen 在 03-17-2003 08:56 发表:
如何在RH8中给一个网卡绑定多个IP?
请教各位:
如何才能在RH8中给一个网卡绑定多个IP地址?
如何才能实现让外部网络访问局域网的开设的各种服务比如说:www,ftp等?
由 baif 在 03-17-2003 14:06 发表:
请查阅ifconfig及相关命令
rt.
由 waynewu 在 03-17-2003 14:42 发表:
一个网卡绑定多个IP
1. ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
2. ifconfig eth0:1 192.168.1.2 netmask 255.255.255.0
外部网络访问局域网的开设的各种服务比如说:ftp
iptables -t nat -A PRERROUTING -I eth0 -p tcp --dport 21 -j dnat --to xxx.xxx.xxx.xxx:21
(eth0 接的是外网, eth1 接的是内网)
由 Snoopy 在 03-17-2003 16:43 发表:
一个网卡邦定多个ip有什么作用 ????
拨号后你能得到两个ip才有用,,,
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
由 suyizhen 在 03-17-2003 18:47 发表:
我不是拔号,所以设两个IP是可以的。
以前我用win2000做服务器的时候就设了几个IP。
可以不以在linux服务器上设置两个IP,然后用其中一个IP对应用我在局域网的开的服务(ftp).
我的设置服务器是两网卡:
eth0接外网能上网。
eth1接局域网通过squid代理+NAT+iptables设置防火墙能上网
我的局域网的内一台机子IP:192.168.0.151开一个ftp服务。
ifconfig 的命令怎么用?
由 suyizhen 在 03-17-2003 18:52 发表:
我的网卡原来有一个IP了,我想再设第二个要不要把网卡down了之后再设?
由 babo 在 03-19-2003 08:24 发表:
不用
CPU--->PIII 866
内存-->512M
硬盘-->160G+120G
显卡-->TNT2 32M
由 Snoopy 在 03-19-2003 12:54 发表:
1. ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
2. ifconfig eth0:1 192.168.1.2 netmask 255.255.255.0
你这里的0和1,,各代表什么?是不是第一个ip第二个ip?
一般可以设置多少个ip??
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
由 suyizhen 在 03-19-2003 15:41 发表:
我怎么样才知道已经绑定了两个IP?
由 babo 在 03-19-2003 16:56 发表:
1. ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
2. ifconfig eth0:1 192.168.1.2 netmask 255.255.255.0
说明
eth0:0代表你的 192.168.1.1绑订在了eth0:0这个设备上
第二个也一样,只不过是个设备名.
小弟刚学linux,有不对的地方,还望大家支点
CPU--->PIII 866
内存-->512M
硬盘-->160G+120G
显卡-->TNT2 32M
由 waynewu 在 03-21-2003 13:25 发表:
想知道如何绑定多个IP在命令行中输入ifconfig
局域网的开设ftp试试这条命令:
iptables -t nat -A PRERROUTING -I eth0 -p tcp --dport 21 -j dnat --to 192.168.0.151:21
(iptables服务要打开)
由 suyizhen