View previous topic :: View next topic |
Author |
Message |
CarloJekko Veteran


Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Thu Nov 17, 2005 5:17 pm Post subject: [ot] valknut ed iptables [risolto] |
|
|
Scusate la domanda... ma non sono riuscito a trovare una soluzione
Io ho sul mio pc un firewall iptables ed un server dhcp che dà vari ip a diversi pc collegata alla mia rete NAT
Internet -> gentoo(firewal) 66.244.88.12=MIOIP -> Altri 2 pc , ed uno con valknut (192.168.0.24x)
Il problema è il seguente... per avviare valmnut ho bisigno che il firewall non filtri i paccehtti udp e tcp alla porta 9176 in direzione della macchina con valknut che riceve un ip dinamico che varia tra 192.168.0.241 a 244.
Per farlo metto queste regole
Code: | iptables -t nat -A PREROUTING -d $(MIOIP) -p tcp --dport 9176 -j DNAT --to 192.168.0.24x
iptables -t nat -A PREROUTING -d $(MIOIP) -p udp --dport 9176 -j DNAT --to 192.168.0.24x
iptables -A FORWARD -o eth1 -d 192.168.0.24x -p tcp --dport 9176 -j ACCEPT
iptables -A FORWARD -o eth1 -d 192.168.0.24x -p udp --dport 9176 -j ACCEPT |
ma il fatto è che l'ip varia di volta in volta... Come faccio ad abilitare questa porta a questo indirizzo ? _________________ C.
Last edited by CarloJekko on Thu Nov 17, 2005 6:46 pm; edited 1 time in total |
|
Back to top |
|
 |
makoomba Bodhisattva


Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 17, 2005 5:48 pm Post subject: |
|
|
il modo più semplice è assegnare un ip statico al client.
altrimenti la regola va modificata ad ogni cambio di indirizzo |
|
Back to top |
|
 |
CarloJekko Veteran


Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Thu Nov 17, 2005 5:54 pm Post subject: |
|
|
il fatto è che dhcp mi è comodissimo... infatti nel mio studiolo vengono amici e si collegano allo switch con dhcp senza che devono modificare le loro impostazioni... O forse tu intendi un ip statico alla macchina con valknut? _________________ C. |
|
Back to top |
|
 |
makoomba Bodhisattva


Joined: 03 Jun 2004 Posts: 1856
|
Posted: Thu Nov 17, 2005 5:55 pm Post subject: |
|
|
sì, intendevo solo a quella |
|
Back to top |
|
 |
CarloJekko Veteran


Joined: 31 Mar 2005 Posts: 1315 Location: Baia Domizia :-)
|
Posted: Thu Nov 17, 2005 6:46 pm Post subject: |
|
|
si infatti farò così... grazie _________________ C. |
|
Back to top |
|
 |
.:deadhead:. Advocate


Joined: 25 Nov 2003 Posts: 2963 Location: Milano, Italy
|
|
Back to top |
|
 |
|