Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Iptables & win
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)
View previous topic :: View next topic  
Author Message
ScolaBirra
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 180
Location: Lausanne, Switzerland

PostPosted: Fri Sep 19, 2003 3:48 pm    Post subject: Iptables & win Reply with quote

Ciao,
sto giocando un po' con vmware su cui ho installato win2k. Ora per farla breve e' come se la mia gentoo-box fosse un router-firewall con due interfaccie: eth0 e vmnet2.
Visto che ho detto a vmware di far affacciare win2k solo sulla vmnet2, di base da win non si puo' navigare. Poi ho aggiunto un paio di regole:

iptables -A FORWARD -i eth0 -o vmnet2 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i vmnet2 -o eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

ed ecco che magicamente navigo senza problemi. Ora volevo fargli vedere anche gli altri win2k presenti nella subnet ed ho provato con un:

iptables -A FORWARD -i eth0 -o vmnet2 -p tcp --dport 137:139 -j ACCEPT
iptables -A FORWARD -i eth0 -o vmnet2 -p udp --dport 137:139 -j ACCEPT
iptables -A FORWARD -i eth0 -o vmnet2 -p tcp --dport 445 -j ACCEPT
iptables -A FORWARD -i eth0 -o vmnet2 -p udp --dport 445 -j ACCEPT
iptables -A PREROUTING -i eth0 -t nat -p tcp --dport 137:139 -j DNAT --to-destination 192.168.43.128
iptables -A PREROUTING -i eth0 -t nat -p udp --dport 137:139 -j DNAT --to-destination 192.168.43.128
iptables -A PREROUTING -i eth0 -t nat -p tcp --dport 445 -j DNAT --to-destination 192.168.43.128
iptables -A PREROUTING -i eth0 -t nat -p udp --dport 445 -j DNAT --to-destination 192.168.43.128

(chiaramente l'indirizzo della virtual machine e' 192.168.43.128)... ma non funziona....

Cosa devo ancora aggiungere?

Grazie per l'aiuto

Ciao
Scola
_________________
Smile, tomorrow will be worse! :-)
Back to top
View user's profile Send private message
cerri
Bodhisattva
Bodhisattva


Joined: 05 Mar 2003
Posts: 2957
Location: # init S

PostPosted: Fri Sep 19, 2003 8:12 pm    Post subject: Reply with quote

Sicuramente tutte le regole di POSTROUTING e di forward al contrario.
Nei log vedi niente di bloccato?
Inoltre, secondo quanto scritto qui vanno anche nattati gli headers del pacchetto.... ma ...
_________________
Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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