linux下如何设置使另一台机器通过我这台机器上网?要另外加装什么软件吗 (100分)

  • 主题发起人 WorldCreater
  • 开始时间
W

WorldCreater

Unregistered / Unconfirmed
GUEST, unregistred user!
RedHat的lilo配置文件不是lilo.conf是吧,而是lilo.conf.ana...
我改了lilo.conf.ana...文件后(只改了windows的label)运行/sbin/lilo /etc/lilo.conf.ana..
不成功。(25分)问题己解决。标签不能有空格?如 label="windows 2000"?
linux里哪个命令与ipconfig命令相似?(25分)
如何设置使另一台机器通过我这台机器上网?要另外加装什么软件吗(就象winroute一样的)我的机器装了双网卡(50分)
 
看版本, ifconfig或者netconfig
netconfig中设置好网关就能上网了
 
lilo这个问题我碰过,我用的是red hat7.0
 
对于ICS问题,如果你的是两台机器而已,用window自带的ICS功能就行。当然设置问题就
看你的OS了,如果你就用双网卡,没有HUB的话,最好用2kserver带的软路由吧。如何设置。
去pconline.com.cn看看吧。大把文章谈到。
 
to vinlin
有交换机。我想问的是,如何在linux下使另一台机也能通过我这机子上网?
或者是不是需要装一个在linux下用的如windows平台的winroute一样的东西
 
首先你的linux要安装双网卡
一个对内,一个对外,
用netconf配置路由。
它作为一个路由器来转发数据,也可以伪装。
 
lilo的配置文件就是/etc/lilo.conf
netconfig
如果linux做服务器,可以用ipchains或者iptables,不过要装双网卡
 
这里有详细的配置文档
http://www.fanqiang.com/a3/b2/20020214/06150086.html
http://www.yesky.com/20010605/183018.shtml
 
共享上网使用iptables或者ipchains,如果你用linux做网关的话。
 
设置netconfig 和 route 即可
 
使用iptables作映射。
 
还是不成功。我把我的配置文件贴出来大家看看应怎么做:
#/etc/conf.modules
alias eth1 via-rhine
alias parport_lowlevel parport_pc
alias eth0 via-rhine
====================================================================
#/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=creatxr
GATEWAY="192.168.0.5"
GATEWAY="eth1"
ONBOOT=YES
FORWARD_IPV4="yes"
====================================================================
#这是与外网连的网卡,ip为dns自动分配的
#/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"

====================================================================
#这是作为网关的网卡,与内网连
#/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
BROADCAST=192.168.0.255
IPADDR=192.168.0.5
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
====================================================================
#这是我用命令 iptables -list 打出的
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- dns.fz.fj.cn anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- bj-dns.cnc171.net anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- dns.fjgwbn.net.cn anywhere udp spt:domain dpts:1025:65535
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp flags:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
 
顶部