cwwhy 发表于 2003-3-29 13:07:42

iptables 怎么实现ip伪装服务

rh8.0中找不到ipchains 但有iptables 不知道该怎么实现ip转发,我们用hub
共享上网,别的机器能ping通主机,可怎么也上不了网,可能是防火墙的原因吧

jeock 发表于 2003-3-31 02:15:25

well..i just solved this fucking problem.
first, u have to change the /etc/dhcpd.conf into
  
      subnet 192.168.1.0 netmask 255.255.255.0 {

  range 192.168.1.2 192.168.1.4;

  default-lease-time 86400;

  max-lease-time 259200;

  option subnet-mask 255.255.255.0;

  option broadcast-address 192.168.1.255;

  option routers 192.168.1.254;

  option domain-name-servers 192.168.1.254;

  }

here, assume eth0 is connect to your isp and eth1 connected to lan.

and then, type
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t nat -A FORWARD -i eth1 -j ACCEPT

cwwhy 发表于 2003-3-31 10:17:31

/etc/dhcpd.conf   这个文件好像没有啊??? 喔! 明白了,我没用dhcp分配ip 地址,我用的网关设置实现的

tonybeo 发表于 2003-4-16 08:59:20

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 211.93.111.0/24 -o eth0 -j SNAT --to 211.93.111.222
页: [1]
查看完整版本: iptables 怎么实现ip伪装服务