View previous topic :: View next topic |
Author |
Message |
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Wed Nov 09, 2005 12:54 pm Post subject: |
|
|
ammetto di aver letto superficialmente il post
la soluzione migliore e' spegnere il dhcp server del router e abilitare quello del nostro server.
Se cio' non fosse possibile dovresti lavorare con ebtables (ma ricordo che qc mi aveva mostrato qc con iptables in alternativa che semplificherebbe la vita...)
ciao _________________ while True:Gentoo() |
|
Back to top |
|
|
kattivo Guru
Joined: 28 Jan 2005 Posts: 450 Location: Treviso
|
Posted: Wed Nov 09, 2005 1:30 pm Post subject: |
|
|
Ho provato a togliere l'eth0 dalla lista del bridge...pero' non è cambiato niente di buono.. |
|
Back to top |
|
|
makoomba Bodhisattva
Joined: 03 Jun 2004 Posts: 1856
|
Posted: Wed Nov 09, 2005 2:51 pm Post subject: |
|
|
mi spieghi perchè vuoi togliere eth0 dal bridge ? |
|
Back to top |
|
|
kattivo Guru
Joined: 28 Jan 2005 Posts: 450 Location: Treviso
|
Posted: Thu Nov 10, 2005 9:50 am Post subject: |
|
|
Allora ora ti spiego cosa voglio fare..
il mio scopo è fare in modo che quel server faccia da server dhcp ai client che vengono collegati.
ora con il bridge i client prendono l'indirizzo ip del router..che io non voglio. e non prendono quello del dnsmasq.
il mio scopo sarebbe quello... |
|
Back to top |
|
|
makoomba Bodhisattva
Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 10, 2005 9:55 am Post subject: |
|
|
non puoi, semplicemente, disabilitare il dhcp server del router ?
o, se non hai accesso al router, bloccare il traffico con iptables ? |
|
Back to top |
|
|
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Thu Nov 10, 2005 10:14 am Post subject: |
|
|
CONFIG_IP_NF_MATCH_PHYSDEV
questo dovrebbe fare al caso tuo.
Non l'ho mai provato perche' ai tempi quando ho avuto problemi simili a questi ho usato ebtables...
ciao _________________ while True:Gentoo() |
|
Back to top |
|
|
makoomba Bodhisattva
Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 10, 2005 10:24 am Post subject: |
|
|
@xchris
vero, physdev è fondamentale.
va anche ricompilato iptables |
|
Back to top |
|
|
kattivo Guru
Joined: 28 Jan 2005 Posts: 450 Location: Treviso
|
Posted: Thu Nov 10, 2005 1:37 pm Post subject: |
|
|
se disattivo il dhcp del router non ottengo niente.. perchè km non mi prende il dhcp del server.... |
|
Back to top |
|
|
federico Advocate
Joined: 18 Feb 2003 Posts: 3272 Location: Italy, Milano
|
|
Back to top |
|
|
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Thu Nov 10, 2005 4:24 pm Post subject: |
|
|
naaaa...
tutto si risolve
ma ho capito male o stato lavorando fisicamente sullo stesso server? _________________ while True:Gentoo() |
|
Back to top |
|
|
makoomba Bodhisattva
Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 10, 2005 4:28 pm Post subject: |
|
|
fede, fai il punto: cosa funziona ? quali sono i problemi ?
io e xchris ci siamo a darvi una mano, magari si aggiunge qualcun altro e vediamo di far funzionare sto coso |
|
Back to top |
|
|
federico Advocate
Joined: 18 Feb 2003 Posts: 3272 Location: Italy, Milano
|
Posted: Thu Nov 10, 2005 4:30 pm Post subject: |
|
|
xchris wrote: | naaaa...
tutto si risolve
ma ho capito male o stato lavorando fisicamente sullo stesso server? |
Io da remoto e lui da locale. Concettualmente ci sto capendo veramente poco a dirla tutta, se mettessi in bridge _tutte_ le schede di rete finisce che le ho come se ci fosse un hub attaccato direttamente al router, e la cosa mi pare un po' stupida (ma immagino di non aver capito io).
Allora starei cercando di fare concettualmente come se avessi una scheda di rete eth0 attaccata al router, e una scheda di rete attaccata alla lan, il bridge, vediamo se per stasera ce la faccio..
PS: Posso assicurare che il kernel e' stato compilato con tutte le opzioni che abbiamo discusso nelle ultime pagine e ho ricompilato in proposito anche iptables, la macchina e' installata pressoche' nuova percui stiamo lavorando su un'installazione pulita. _________________ Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk |
|
Back to top |
|
|
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Thu Nov 10, 2005 4:43 pm Post subject: |
|
|
ok...
scusami se sono stordito ma per ora ho capito questo:
Code: |
router1
------- eth0 -- Server ---- eth1 -- client
router2 ---- eth2 -- client
---- eth3 -- client
|
-router1 ha un server dhcp
-router2 no
Dovete far vedere tra di loro n client e permettere la navigazione tramite router1 e router2
Dovete assegnare gli IP dal Server e non da Router1
Mi confermi,correggi? _________________ while True:Gentoo() |
|
Back to top |
|
|
makoomba Bodhisattva
Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 10, 2005 4:51 pm Post subject: |
|
|
federico wrote: | se mettessi in bridge _tutte_ le schede di rete finisce che le ho come se ci fosse un hub attaccato direttamente al router, e la cosa mi pare un po' stupida (ma immagino di non aver capito io). |
il bridge serve esattamente a questo.
il server diventa uno switch per l'intera (e unica) lan, può filtrare il traffico e offrire servizi su br0 (squid, dnscache, dhcpd, etc)
sui client, imposti come gw il router oppure il bridge stesso |
|
Back to top |
|
|
federico Advocate
Joined: 18 Feb 2003 Posts: 3272 Location: Italy, Milano
|
Posted: Thu Nov 10, 2005 5:14 pm Post subject: |
|
|
Dunque, ora pare funzionare.
Ho utilizzato questa configurazione per net
Code: |
config_eth0=( "192.168.0.125 netmask 255.255.255.0" )
routes_eth0=( "default gw 192.168.0.254" )
bridge_br0="eth1 eth2 eth3 eth4 eth5 eth6 eth7 eth8 eth9 eth10 eth11 eth12"
config_br0=( "192.168.1.1" )
config_eth1=( "null" )
config_eth2=( "null" )
config_eth3=( "null" )
config_eth4=( "null" )
config_eth5=( "null" )
config_eth6=( "null" )
config_eth7=( "null" )
config_eth8=( "null" )
config_eth9=( "null" )
config_eth10=( "null" )
config_eth11=( "null" )
config_eth12=( "null" )
|
e ho attivato i servizi su br0
Code: |
Interesting ports on 192.168.1.1:
(The 1662 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3128/tcp open squid-http
|
A questo punto ho messo la regola di iptables che mi aiuta a fare il proxy squid trasparente alla lan in questo modo
Code: |
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 3128
|
E pare funzionare. Forse ogni tanto ha qualche singhiozzo, ancora da valutare se si tratta di un problema di linea, di server, o di iptables...
Secondo voi e' una configurazione corretta? _________________ Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk |
|
Back to top |
|
|
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Thu Nov 10, 2005 5:24 pm Post subject: |
|
|
io inizierei a provare senza squid (anche se non e' lui il colpevole meglio testare nelle condizioni + semplici)
Sinceramente non ho mai fatto un megabridge cosi' e in questo caso mi sembra proprio una pazzia.
farei quindi dei test limitando il bridge ad un paio di client..
Controllerei anche un po' di log per vedere se non c'e' qualche scheda di rete che rompe le palle.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
|
|