Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT] quale interfaccia di rete uso?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
falko
Apprentice
Apprentice


Joined: 03 Dec 2004
Posts: 242
Location: Rovereto (TN) Italy

PostPosted: Sat Jan 30, 2010 2:03 pm    Post subject: [OT] quale interfaccia di rete uso? Reply with quote

Buon giorno,
Ho un piccolo problema che non riguarda direttamente gentoo ma linux in generale. Attualmente ho un PC configurato con più interfacce di rete virtuali, vorrei sapere come posso fare per decidere quale interfaccia usare usare dei servizi.

Il mio problema pratico è che dovendo configurare un firewall devo sapere con quale indirizzo IP tento di uscire verso l'esterno su una macchina che fa da server FTP

Devo impostare qualche variabile d'ambiente? o come posso fare?
Grazie
_________________
Io non sarò mai nessuno ma... nessuno sarà mai come me. (Jim Morrison)

A ciacere no se sgonfa done

Gentoo on: Lenovo R500
Back to top
View user's profile Send private message
falko
Apprentice
Apprentice


Joined: 03 Dec 2004
Posts: 242
Location: Rovereto (TN) Italy

PostPosted: Sat Jan 30, 2010 2:34 pm    Post subject: Reply with quote

Che sciocco bisognerà sicuramente agire con iptable :)

Code:
# iptables -A OUTPUT -o  eth1 --dport ftp -j ACCEPT


In teoria con questo comando dovrebbe andare... (tutto il traffico FTP dovrebbe essere instradato usando l'interfaccia eth1)
purtroppo adesso non lo posso provare :cry:
il mio dubbio è che si possa fare anche con le interfacce virtuali :?
_________________
Io non sarò mai nessuno ma... nessuno sarà mai come me. (Jim Morrison)

A ciacere no se sgonfa done

Gentoo on: Lenovo R500
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Jan 30, 2010 8:18 pm    Post subject: Reply with quote

falko wrote:
*


Non sono ben sicuro di aver capito esattamente quello che vuoi fare ... provo facendo delle assunzioni a darti una risposta.

Suppongo che per interfacce virtuali tu intenda alias del tipo eth0:1, eth0:2 e così via ...

Se ciò è vero devi solamente configurare il server ftp per fare bind sull'IP dell'interfaccia virtuale, null'altro.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
falko
Apprentice
Apprentice


Joined: 03 Dec 2004
Posts: 242
Location: Rovereto (TN) Italy

PostPosted: Sun Jan 31, 2010 9:33 am    Post subject: Reply with quote

Io devo copiare dei file da una macchina con più interfacce virtuali su un server ftp che risiede fisicamente su un'altra macchina esterna alla mia LAN per fare questo devo passare attraverso un firewall che deve essere configurato in modo tale che da lasciar passare il traffico ftp della prima macchina verso la seconda.
Ora siccome non sono sicuro con che interfaccia venga tentato l'accesso al server FTP volevo creare una regola che tutto il traffico FTP appunto venisse instradato su una particolare interfaccia di rete virtuale
_________________
Io non sarò mai nessuno ma... nessuno sarà mai come me. (Jim Morrison)

A ciacere no se sgonfa done

Gentoo on: Lenovo R500
Back to top
View user's profile Send private message
devilheart
l33t
l33t


Joined: 17 Mar 2005
Posts: 848
Location: Villach, Austria

PostPosted: Sun Jan 31, 2010 10:04 am    Post subject: Reply with quote

immagino che il firewall stia su un computer diverso da quello con le interfacce virtuali, quindi devi abilitare le 2 porte dell'ftp nella tabella forward
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sun Jan 31, 2010 11:12 am    Post subject: Reply with quote

Supponendo che l'interfaccia con cui vuoi uscire sia eth0:1 e che l'IP del server ftp sia 192.168.1.100, ti basta usare qualcosa del genere:

Code:
route add -host 192.168.1.100 dev eth0:1

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
falko
Apprentice
Apprentice


Joined: 03 Dec 2004
Posts: 242
Location: Rovereto (TN) Italy

PostPosted: Sun Jan 31, 2010 5:38 pm    Post subject: Reply with quote

si, penso che l'aggiunta di una regola nella tabella di routing sia la soluzione più elegante [/quote]
_________________
Io non sarò mai nessuno ma... nessuno sarà mai come me. (Jim Morrison)

A ciacere no se sgonfa done

Gentoo on: Lenovo R500
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sun Jan 31, 2010 5:44 pm    Post subject: Reply with quote

falko wrote:
si, penso che l'aggiunta di una regola nella tabella di routing sia la soluzione più elegante


Ho fatto una prova e sembra andare ... fammi sapere se è quello che volevi.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum