Re: Setting up a home gateway/router
Vincent W. Chen a écrit :
>
> Do you mean that eth0 on GW has a static IP address?
No, the OP wrote that internet-facing eth0 has a DHCP address from the ISP.
> # If you have IPv6
> iface eth0 inet6 static
> address ::1
> netmask 64
Nonsense. ::1 is for the loopback interface only.
If you have IPv6, use your own global prefix.
If you meant ::1 as an example, note that there is an IPv6 prefix
dedicated to examples and documentation : 2001:db8::/32.
> You have to allow forwarding from your LAN to the outside internet. In
> /etc/sysctl.conf, enable
>
> net.ipv4.ip_forward=1
> # If you have IPv6
> net.ipv6.conf.all.forwarding=1
You'll probably need to do masquerading for IPv4 with iptables.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE.
You could also set up a DHCP and DNS server on the gateway to make
configuration easier on the LAN hosts. dnsmasq is reported to be easy.
Reply to: