Claudio ha scritto:
snip ...
Solo che io sono connesso tramite modem(linea telefonica KPPP), non
con ADSL. E non so come fare la condivisione.
Ciao e grazie
Puoi trovare un esempio che in genere si adatta alle esigenze piu'
comuni nel file /etc/rc.d/rc.modules , verso la fine dello stesso. Per
maggiore chiarezza ti riporto tali linee di seguito:
-----------
# IP masquerading modules:
# These modules are used with IP masquerading, a process which allows
you to
# use a Linux box connected to the Internet (via PPP or SLIP, or some
other
# means) as a gateway for other Linux, Windows, Macintosh boxes on
your local
# network that don't have real IP addresses on the Internet. The packets
# going through the Linux machine are "masqueraded", or made to look
as if
# they're all coming from the one real IP address on the Internet.
#
# As a quick example (for a much more extensive treatment, see the
IP-Masquerade
# mini-HOWTO) to allow Internet access to a local network 192.168.11.0
with a
# netmask of 255.255.255.0, you'd use these commands in
/etc/rc.d/rc.local:
#
# # EXTERNAL -> external network interface
# # INTERNAL -> internal network interface
# EXTERNAL=eth0
# INTERNAL=eth1
# echo 1 > /proc/sys/net/ipv4/ip_forward
# echo "Setting up NAT (Network Address Translation)..."
# # by default, nothing is forwarded.
# iptables -P FORWARD DROP
# # Allow all connections OUT and only related ones IN
# iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state
ESTABLISHED,RELATED -j ACCEPT
# iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT
# # enable MASQUERADING
# iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
#
# Then you'd have to set the other boxes on your local network to use the
# Linux machine as their TCP/IP gateway. You'll probably also need to
plug
# in the IP address for your Internet service provider in each
machine's DNS
# setup.
---------
Penso che ti basti sostituire eth0 con ppp0 ed eth1 con eth0, cioe'
setti:
EXTERNAL=ppp0
INTERNAL=eth0
al posto di come sono settati sopra e il tutto dovrebbe andare;
naturalmente devi togliere i commenti ai vari comandi :)
Credo sarebbe cmq piu' comodo mettere tutto in uno script a parte, e
magari farlo lanciare da kppp quando ti connetti.
Mithenks