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

Re: Condivisione accesso internet da server linux a client di rete #2



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scusate,
avevo risposto in privato per errore.
Ric

On Oct 1, 2005, at 7:05 PM, Riccardo Tortorici wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct 1, 2005, at 6:40 PM, WannaBe wrote:



Ciao, vi riscrivo, magari sono + fortunato..
questa è la mia situazione:


Ciao,



Server debian con due schede lan, una con 192.168.x.x che va al router adsl (navigazione ok) e una con 10.1.x.x che va alla rete lan con i pc. La mia esigenza è quella far passare i pc in rete, attraverso il server Linux,
durante la navigazione in modo da avere maggiore controllo. Cosa
fattibilissima... e "facilissima".. x voi..

Ho bisogno di sapere quali sono le fasi che devo seguire..


Dato lo scenario:

Router ADSL - LAN INT. 192.168.0.1/30
Server Linux - eth0 (verso router) 192.168.0.2/30 - eth1 (verso i client) 10.1.0.1/24
Uno dei client - 10.1.0.2

Sul server linux (questo è il metodo che uso io, poi ognuno fa come vuole):
ti crei il file /etc/rc2.d/S99fw:
- -----------------------

#!/bin/bash
#
iptables -P FORWARD DROP
iptables -F
iptables -Z
modprobe ip_tables
modprobe ip_conntrack
modprobe iptable_filter
modprobe iptable_nat
modprobe ip_conntrack
modprobe ipt_MASQUERADE
modprobe iptable_nat
modprobe ip_nat_ftp
echo 1 > /proc/sys/net/ipv4/ip_forward
#
iptables -A POSTROUTING -t nat -j MASQUERADE
iptables -A FORWARD -s 10.1.0.0/24 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

- --------------------
dai i permessi di scrittura a /etc/rc2.d/S99fw
esegui /etc/rc2.d/S99fw

Sui client:
Imposti 10.1.0.1 come default gateway



Presumo ci sia qualcosa da impostare a livello di mascheramento degli ip e a livello di firewall oltre che impostare correttamente i parametri tcp dei
vari client di rete


Spero ci sia tutto, vado un po' di fretta:-)
Fammi sapere se funzia.
Ric

- - Riccardo Tortorici -
Linux Registered User #365170
Count yourself @ http://counter.li.org/ !
- --
no1984.org member - Stop TCG!
- --
HTML email can be dangerous, is not always readable, wastes bandwidth
and is simply not necessary please don't send them to me!

http://www.georgedillon.com/web/netiquette.shtml





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDPsHYSiJn2/P84wYRAjrHAJ4wCVRI7XxkSbrE0vFjQkmRcDbIdACfb7rP
ELNFxctm0MC4j35PTI4OtOs=
=grfx
-----END PGP SIGNATURE-----


- - Riccardo Tortorici -
Linux Registered User #365170
Count yourself @ http://counter.li.org/ !
- --
no1984.org member - Stop TCG!
- --
HTML email can be dangerous, is not always readable, wastes bandwidth
and is simply not necessary please don't send them to me!

http://www.georgedillon.com/web/netiquette.shtml





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDPsPJSiJn2/P84wYRAvMUAJ9G77Ga7ed9nlp0jNjxODLGbkhaQQCdGh26
q1DLobx+pRFGCcWOX9NmbcU=
=lp+D
-----END PGP SIGNATURE-----



Reply to: