[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables


Manu a écrit :
> Hello,
> I'm French, I'm sorry for my bad english.

You'd better be sorry for posting HTML.

> I'm a beginner debian user.
> In my home network, I have a linux machine with debian6.
> My debian has to do dhcp server with isc-server.
> I have 2 network card, eth0 = public Ip (adsl modem)
> eth1 = lan.
> My dhcp server runs.
> But I can't connect to internet with pc's.
> Description :
> network  :
> mask :
> Windows server:
> Linux server (Debian6) : (DHCP a    nd gateway to wan)
> Accesspoint Wifi :
> NAS server :
> laptop :
> IP phone :,,
> I can connect to lan machines but not to wan.
> cat /proc/sys/net/ipv4/ip_forward is 1
> What are routes I have to create with route command ?

Probably none. But maybe you missed the masquerading.

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

> How can I routed 80 port to  with iptables ?

If you mean port forwarding of connections coming from outside :

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 \
  -j DNAT --to

But as is the box itself, this is probably not what you want.

Reply to: