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

Re: iptables

On 2011-06-22 Manu wrote:
> 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.

Do the hosts in your LAN have a default gateway, i.e. does your DHCP
server pass out a router option with the leases? Check with "ipconfig"
on Windows or "route" on Linux hosts.

> cat /proc/sys/net/ipv4/ip_forward is 1
> What are routes I have to create with route command ?

Normally you shouldn't have to create any for that kind of setup.

Please post the output of "iptables -nL" and "iptables -t nat -nL".

> How can I routed 80 port to  with iptables ?

That is called port-forwarding, not routing. It's done via DNAT. See [1]
for instance.

[1] http://www.debian-administration.org/articles/73

Ansgar Wiechers
"All vulnerabilities deserve a public fear period prior to patches
becoming available."
--Jason Coombs on Bugtraq

Reply to: