stecciu 10 Report post Posted March 12, 2009 aspetta forse è il venet0? Vedo il Point-to-Point.. giusto per essere sicuri.. tu lo vedi? lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:580418971615825070 errors:0 dropped:0 overruns:0 frame:0 TX packets:1085555019222 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:945028996213 (880.1 GiB) TX bytes:1751941779348 (1.5 TiB) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:30270 errors:0 dropped:0 overruns:0 frame:0 TX packets:34198 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3293940 (3.1 MiB) TX bytes:6715295 (6.4 MiB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:XXX.XXX.XXX.XXX P-t-P:XXX.XXX.XXX.XXX Bcast:XXX.XXX.XXX.XXX Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 Share this post Link to post Share on other sites
VpsUser 10 Report post Posted March 12, 2009 aspetta forse è il venet0? Vedo il Point-to-Point..giusto per essere sicuri.. tu lo vedi? lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:580418971615825070 errors:0 dropped:0 overruns:0 frame:0 TX packets:1085555019222 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:945028996213 (880.1 GiB) TX bytes:1751941779348 (1.5 TiB) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:30270 errors:0 dropped:0 overruns:0 frame:0 TX packets:34198 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3293940 (3.1 MiB) TX bytes:6715295 (6.4 MiB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:XXX.XXX.XXX.XXX P-t-P:XXX.XXX.XXX.XXX Bcast:XXX.XXX.XXX.XXX Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 Uhm forse mi sbaglio,ma vnet0 fa riferimento al loopback e se negli indirizzi coperti in venet0:0 non compaiono gli indirizzi che hai assegnato ai due endpoint della Vpn,non dovrebbe essere direttamente collegata ad essa. Sono più portato a pensare che quelle due interfaces siano il mezzo attraverso il quale l'unico Kernel che gestisce le diverse vps presenti sulla macchina fisica (che sostanzialmente in soluzioni non Xen sono semplici processi che girano su di un unico Kernel) instrada i pachetti da e verso le Vps con Internet,ma anche qui non ci metterei la mano sul fuoco.... Share this post Link to post Share on other sites
stecciu 10 Report post Posted March 12, 2009 ok, intanto ti ringrazio! ho aperto l'ennesimo ticket all'assistenza.. speriamo bene.. Senti una domanda ma gli ip degli end point devono essere messi in funzione della rete da cui si accede (quella di casa) o semplicemente devono essere impostati diversamente dalla propria rete? A quanto ho capito la rete di casa deve essere diversa giusto? sia di subnet che di ip, in questo modo non si rischiano collisioni giusto? Share this post Link to post Share on other sites
VpsUser 10 Report post Posted March 12, 2009 ok, intanto ti ringrazio! ho aperto l'ennesimo ticket all'assistenza.. speriamo bene.. Senti una domanda ma gli ip degli end point devono essere messi in funzione della rete da cui si accede (quella di casa) o semplicemente devono essere impostati diversamente dalla propria rete? A quanto ho capito la rete di casa deve essere diversa giusto? sia di subnet che di ip, in questo modo non si rischiano collisioni giusto? Gli indirizzi della Vpn è buona norma (ma non è un'obbligo) sceglierli tra quelli destinate alle LAN,tipo 192.168.x.x oppure 10.x.x.x ovviamente facendo attenzione ad eventuali conflitti con macchine eventualmente presenti nella eventuale LAN cui appartengono gli endpoint della VPN. Quando metti up la Vpn,nella relativa interfaccia (tun o tap) vedi solo gli indirizzi "virtuali" della Vpn,non quelli "fisici" delle due macchine collegate dal tunnel. Tanto per fare un'esempio,questo è un'estratto del mio ifconfig: tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.18.18.1 P-t-P:10.18.18.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:146151 errors:0 dropped:0 overruns:0 frame:0 TX packets:193030 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:11460228 (10.9 MiB) TX bytes:230090636 (219.4 MiB) tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.9.18.1 P-t-P:10.9.18.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:1375229 errors:0 dropped:0 overruns:0 frame:0 TX packets:2047617 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:104640645 (99.7 MiB) TX bytes:2534949335 (2.3 GiB) Come vedi sono presenti solo indirizzi 10.x.x.x e non quelli reali delle macchine,ogni tun corrisponde ad un tunnel, ne ho due,perchè in base al tunnel utilizzato,i pacchetti vengono instradati in rete per "strade" diverse.... Share this post Link to post Share on other sites
stefano62 10 Report post Posted April 18, 2009 Tutto quello che ti serve è qui Welcome to OpenVPN ti consiglio di cominciare prima con un tunnel a chiave condivisa,per prenderci "confidenza",poi passi al sistema asimettrico delle chiavi con autenticazione basata sui certificati,una volta qui poi sei in grado di fare quello che ti pare :sisi: Ps: Se intendi usare la VPS come internet gateway del client VPN ricordati di abilitare il forwarding. Scusa VpsUser ho letto tuto ul thread e mi sembra che tu sia davvero esperto. Io riesco a connettermi al server in VPN con il mio pc di casa dove ho FASTWEB, che come ben saprai non mi da l'IP pubblio. Bene io vorrei usare l'ip del server su cui ho fatto VPN per essere raggiungibile dall'esterno su uns erver FTP. Prò non funziona. Sono riuscito a collegarmi in VPN Ho fatto un port forward sul server di cui ti metto il tracciato di iptables Chain INPUT (policy DROP) target prot opt source destination ACCEPT icmp -- anywhere anywhere VZ_INPUT 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP 0 -- anywhere anywhere state INVALID ACCEPT 0 -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:8443 ACCEPT tcp -- anywhere anywhere tcp dpt:8880 ACCEPT tcp -- anywhere anywhere tcp dpt:www ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:submission ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:ssmtp ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 ACCEPT tcp -- anywhere anywhere tcp dpt:imaps ACCEPT tcp -- anywhere anywhere tcp dpt:poppassd ACCEPT tcp -- anywhere anywhere tcp dpt:mysql ACCEPT tcp -- anywhere anywhere tcp dpt:postgresql ACCEPT tcp -- anywhere anywhere tcp dpt:9008 ACCEPT tcp -- anywhere anywhere tcp dpt:9080 ACCEPT udp -- anywhere anywhere udp dpt:netbios-ns ACCEPT udp -- anywhere anywhere udp dpt:netbios-dgm ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ssn ACCEPT tcp -- anywhere anywhere tcp dpt:microsoft-ds ACCEPT udp -- anywhere anywhere udp dpt:openvpn ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT icmp -- anywhere anywhere icmp type 8 code 0 ACCEPT 0 -- anywhere anywhere Chain FORWARD (policy DROP) target prot opt source destination ACCEPT icmp -- anywhere anywhere VZ_FORWARD 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP 0 -- anywhere anywhere state INVALID ACCEPT 0 -- anywhere anywhere ACCEPT tcp -- IP_DEL_SERVER 192.168.1.2 tcp dpt:222 ACCEPT 0 -- anywhere anywhere Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT icmp -- anywhere anywhere VZ_OUTPUT 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset DROP 0 -- anywhere anywhere state INVALID ACCEPT 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere Chain VZ_FORWARD (1 references) target prot opt source destination ACCEPT tcp -- IP_DEL_SERVER 192.168.1.2 tcp spt:222 dpt:222 Chain VZ_INPUT (1 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:www ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpts:32768:65535 ACCEPT udp -- anywhere anywhere udp dpts:32768:65535 ACCEPT tcp -- anywhere anywhere tcp dpt:8880 ACCEPT tcp -- anywhere anywhere tcp dpt:8443 Dove ho messo IP_DEL_SERVER al posto dell'IP vero. Il mio server FTP ascolta sulla porta 222 e l'IP locale della VPB è 192.168.1.2 Dove sbaglio? Da qualche parte ho sentito parlare anche del maequerading ma non so come usarlo.... Share this post Link to post Share on other sites
SeFlow 16 Report post Posted April 19, 2009 Virtuozzo non ha abilitato di default i moduli vpn sui propri container. Per farlo è necessario farli abilitare direttamente dal provider. Il comando è: vzctl set ID --device c:10:200:rw --save poi bisogna creare i device col comando exec di virtuozzo stessoe impostare i permessi 600 (prendilo con le pinze questo valore che non lo ricordo esattamente, è un lavoro fatto quasi un' anno fa) di /dev/net/tun Il fulcro sta nel vedere se ti permettono di creare vpn. Share this post Link to post Share on other sites
stefano62 10 Report post Posted April 19, 2009 Virtuozzo non ha abilitato di default i moduli vpn sui propri container. Per farlo è necessario farli abilitare direttamente dal provider. Il comando è: vzctl set ID --device c:10:200:rw --save poi bisogna creare i device col comando exec di virtuozzo stessoe impostare i permessi 600 (prendilo con le pinze questo valore che non lo ricordo esattamente, è un lavoro fatto quasi un' anno fa) di /dev/net/tun Il fulcro sta nel vedere se ti permettono di creare vpn. Grazie Seeflow, ma forse la mia domanda non era chiara. La VPN in Virtuozzo me l'ha attivata il gestore dell'hosting su mia richiesta. E mi sembra che ora funzioni tutto, infatti dopo aver abilitato la VPN lato server e lanciato Openvpn sul mio lient faendo un ifgonfig vedo il tunnel on l'IP giusto: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:44142 errors:0 dropped:0 overruns:0 frame:0 TX packets:44142 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4260140 (4.0 MiB) TX bytes:4260140 (4.0 MiB) tap0 Link encap:Ethernet HWaddr 02:7E:12:40:9B:AD inet addr:192.168.1.2 Bcast:192.168.1.3 Mask:255.255.255.25 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Esattamente è il tap0. Il mio problema adesso è che vorei usare l'IP del server come IP pubblico pr fare raggiungere un server FTP che ho sul mio pc. Questo mi serve perchè avendo a casa fastweb non ho un IP pubblico. Come potete vedere dal mio psot precedente ho fatto un port forward dal serve all'ip del mio pc in VPN, ma purtroppo non funziona..... Ho sentito parlrae di un forward maswuerading ma non ho capito bene come funizoni. Ciao e garzie Share this post Link to post Share on other sites