[PLUTO-help] Configurazione di tre nics su un gateway/web server

lucio luke a iond.it
Mar 21 Ott 2003 18:27:08 CEST


Ciao a tutti,
dopo 2 giorni di mal di testa ho capito che avevo bisogno di aiuto.

Ho installato Apache su un gateway server funzionante.

Anticipo i vostri dubbi: so che un server web su una macchina gateway
è un pò insolito, ma per ora questo è l'hardware che ho a disposizione.

Comunque sia, ho inserito una 3za scheda (eth2) sulla quale l'httpd daemon
dovrà essere in ascolto. E qui cominciano le dolenti note:
    Quando l'eth0 e l'eth1 sono disattivate e l'eth2 è attiva Apache
 risponde. Quando tutte le interfacce sono attive Apache non risponde e mi
    ritrovo in /var/log/messages il messaggio:

    martian source 101.102.103.115 from 101.102.103.117, on dev eth2
    giptables-drop-src-norule: IN=eth0 SRC=101.102.103.117
 DST=101.102.103.115 PROTO=TCP SPT=32777 DPT=80 SYN
 giptables-drop-src-norule: IN=eth0 SRC=101.102.103.117 DST=101.102.103.115
 PROTO=TCP SPT=32777 DPT=80 SYN giptables-drop-src-norule: IN=eth0
 SRC=101.102.103.117 DST=101.102.103.115 PROTO=TCP SPT=32777 DPT=80 SYN

L'indirizzo 101.102.103.117 appartiene a una 2da macchina da cui lancio la
 richiesta http. Ma la domanda è: xkè il router manda i pacchetti http alla
 eth0,
o se non interpreto bene, qual'è l'interfaccia che sta ricevendo i pacchetti
 ? Non riesco a capire.

Ho controllato per sicurezza anche i MAC address delle schede nei vari slots
 e corrispondono.

Alcune informazioni sulla macchina:
        kernel: 2.4.22
        grsecurity: 1.9.12-2.4.22
        patch-o-matic: 20030912
        iptables: 1.2.8
        httpd: 2.0.47

Alcune informazioni sulla rete :
        eth0: gateway
        eth1: rete locale
        eth2: httpd

        network: 101.102.103.112
        broadcast: 101.102.103.119

        router: 101.102.103.113
        eth0: 101.102.103.114   netmask 255.255.255.248
        eth1: 192.168.0.1       netmask 255.255.255.0
        eth2: 101.102.103.115   netmask 255.255.255.255  <-- questa netmask è
 corretta ???

Questa è la routing table con eth0 e eth1 on e con eth2 off (ifup eth0, ifup
 eth1): 101.102.103.112  0.0.0.0          255.255.255.248 U     0      0     
   0 eth0 192.168.0.0      0.0.0.0          255.255.255.0   U     0      0   
     0 eth1 127.0.0.0        0.0.0.0          255.0.0.0       U     0      0 
       0 lo 0.0.0.0          101.102.103.114  0.0.0.0         UG    0      0 
       0 eth0

Questa è la routing table dopo l'aggiunta di eth2 (ifup eth2):
101.102.103.112  0.0.0.0          255.255.255.255 U     0      0        0
 eth2  <-- mi sa che qui qualcosa non va !!! 101.102.103.112  0.0.0.0        
  255.255.255.248 U     0      0        0 eth0 192.168.0.0      0.0.0.0      
    255.255.255.0   U     0      0        0 eth1 127.0.0.0        0.0.0.0    
      255.0.0.0       U     0      0        0 lo 0.0.0.0         
 101.102.103.114  0.0.0.0         UG    0      0        0 eth0

Per di più, attivando l'eth2, in /var/log/messages trovo il messaggio:
        martian source 101.102.103.115 from 101.102.103.115, on dev eth0

Il firewall mi sembra a posto.
Queste sono le informazioni relative a eth2 risultanti da iptables-save :
        -A interface2_in -s 101.102.103.115 -j DROP
        -A interface2_in -d 101.102.103.115 -p tcp -m state --state
 NEW,ESTABLISHED -m tcp --sport 1024:65535 --dport 80 -j ACCEPT -A
 interface2_in -d 101.102.103.115 -p tcp -m state --state NEW,ESTABLISHED -m
 tcp --sport 1024:65535 --dport 443 -j ACCEPT -A interface2_out -s
 101.102.103.115 -p tcp -m state --state ESTABLISHED -m tcp --sport 80
 --dport 1024:65535 -j ACCEPT -A interface2_out -s 101.102.103.115 -p tcp -m
 state --state ESTABLISHED -m tcp --sport 443 --dport 1024:65535 -j ACCEPT -A
 network1_in -s 101.102.103.115 -j DROP

Grazie per qualunque aiuto
Lucio



More information about the pluto-help mailing list