View previous topic :: View next topic |
Author |
Message |
shun n00b

Joined: 22 Mar 2005 Posts: 62
|
Posted: Thu Apr 28, 2005 6:49 am Post subject: server linux e client windows...come fare? |
|
|
ciao ragazzi io faccio da server con la mia gentoo ad altri 2 pc collegati in rete locale alla connessione internet che io condivido; se io volessi aprire delle porte per far accedere dei loro programmialla rete come dovrei fare?
grazie anticipatamente sHuN |
|
Back to top |
|
 |
gutter Bodhisattva


Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Thu Apr 28, 2005 7:03 am Post subject: |
|
|
In pratica quello che stai facendo per ora è nattare una rete privata.
Per fare quello che chiedi devi usare iptables, ci sono varie guide a riguardo, basta cercare con goggle. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
 |
neryo Veteran


Joined: 09 Oct 2004 Posts: 1292 Location: Ferrara, Italy, Europe
|
|
Back to top |
|
 |
shun n00b

Joined: 22 Mar 2005 Posts: 62
|
Posted: Thu Apr 28, 2005 11:19 am Post subject: |
|
|
io le iptables le ho gia attive,infatti la connessione è gia condivisa...solo che in alcuniprogrammi di p2p occorre che alcune porte siano aperte,e non so come fare!non so se mi sono fatto capire... |
|
Back to top |
|
 |
Cazzantonio Bodhisattva


Joined: 20 Mar 2004 Posts: 4514 Location: Somewere around the world
|
Posted: Thu Apr 28, 2005 11:41 am Post subject: |
|
|
cioè hai impostato un firewall con iptables e non sai come funziona?
ti consiglio di togliere il firewall  _________________ Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne |
|
Back to top |
|
 |
shun n00b

Joined: 22 Mar 2005 Posts: 62
|
Posted: Thu Apr 28, 2005 11:58 am Post subject: |
|
|
allora,iptables le ho configurate in modo ke gli ip collegati a me ke vanno da 192.168.0.1 e 192.168.0.24 non hanno restrizioni,ma i programmi di p2p su win non vanno,bisognerebbe ke aprissi le porte del programma... |
|
Back to top |
|
 |
Josuke Veteran


Joined: 07 May 2003 Posts: 1175 Location: Italy - Bolzano
|
Posted: Thu Apr 28, 2005 12:04 pm Post subject: |
|
|
mmm quello che ti serve è un forwarding delle porte dei p2p...mettiamo caso che il programma p2p usi le porte da 8001 a 8101 devi con iptables forwardare le queste porte in modo che ogni richiesta venga reindirizzata al pc con il p2p...questo si può fare tranquillamente con iptables basta leggersi una guida _________________ fletto i muscoli...e sono nel vuoto |
|
Back to top |
|
 |
Cazzantonio Bodhisattva


Joined: 20 Mar 2004 Posts: 4514 Location: Somewere around the world
|
Posted: Thu Apr 28, 2005 5:23 pm Post subject: |
|
|
Se quello che vuoi fare è un natting tra ppp0 (o altra interfaccia connessa a internet) e eth0 (o altra interfaccia connessa alla lan) non ti basta una cosa del genere? (questo è il mio script per l'ip masquerading....)
Code: | iptables -F; iptables -t nat -F; iptables -t mangle -F
#questa riga è per un ip statico (eth0 non dhcp)
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.1.1
#quesyta riga è per un indirizzo dinamico (ppp0)
#iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
iptables -P INPUT DROP |
_________________ Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne |
|
Back to top |
|
 |
|