OpenVZ Forum


Home » International » French » réseau vers l'extérieur [résolu]
réseau vers l'extérieur [résolu] [message #36345] Fri, 12 June 2009 02:38 Go to next message
novazur is currently offline  novazur
Messages: 11
Registered: June 2009
Junior Member
Bonjour,

J'ai découvert openvz il y a peu, je pensais m'en être bien sorti. Je m'étais fait un template gentoo qui fonctionnait bien.
Seulement, aujourd'hui, je me fais un autre VE avec le même template, et il n'a pas accès à l'extérieur. Ce n'est à priori pas un problème de parefeu sur le VN.
Pourtant, je ne vois aucune différence :
# diff -ur /vz/root/101/etc /vz/root/103/etc/
diff -ur /vz/root/101/etc/conf.d/hostname /vz/root/103/etc/conf.d/hostname
--- /vz/root/101/etc/conf.d/hostname    2009-06-12 04:04:45.000000000 +0200
+++ /vz/root/103/etc/conf.d/hostname    2009-06-12 04:16:15.000000000 +0200
@@ -2,4 +2,4 @@

 # Set to the hostname of this machine
 hostname="localhost"
-HOSTNAME="vt101"
+HOSTNAME="vt103"
diff -ur /vz/root/101/etc/conf.d/net /vz/root/103/etc/conf.d/net
--- /vz/root/101/etc/conf.d/net 2009-06-12 04:04:45.000000000 +0200
+++ /vz/root/103/etc/conf.d/net 2009-06-12 04:16:15.000000000 +0200
@@ -2,5 +2,5 @@
 # scripts in /etc/init.d.  To create a more complete configuration,
 # please review /etc/conf.d/net.example and save your configuration
 # in /etc/conf.d/net (this file :]!).
-config_venet0=(   "192.168.0.1/32" )
+config_venet0=(   "192.168.0.3/32" )
 routes_venet0=(  "-net 192.0.2.0/24"  "default via 192.0.2.1" )
diff -ur /vz/root/101/etc/hosts /vz/root/103/etc/hosts
--- /vz/root/101/etc/hosts      2009-06-12 04:04:45.000000000 +0200
+++ /vz/root/103/etc/hosts      2009-06-12 04:16:15.000000000 +0200
@@ -30,4 +30,4 @@
 # APNIC, LACNIC, RIPE NCC, or AfriNIC.)
 #
 # Auto-generated hostname. Please do not remove this comment.
-192.168.0.1 vt101
+192.168.0.3 vt103
diff: /vz/root/103/etc/make.profile: Aucun fichier ou dossier de ce type
diff: /vz/root/101/etc/runlevels/default/net.venet0: Aucun fichier ou dossier de ce type
diff: /vz/root/103/etc/runlevels/default/net.venet0: Aucun fichier ou dossier de ce type


le VN a une ip publique : 91.121.8.13
les 2 VE ont pour IP 192.168.0.1 et 192.168.0.3
opline cache # vzctl exec 101 ping -c1 91.121.8.13
PING 91.121.8.13 (91.121.8.13) 56(84) bytes of data.
64 bytes from 91.121.8.13: icmp_seq=1 ttl=64 time=0.076 ms

--- 91.121.8.13 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.076/0.076/0.076/0.000 ms

opline cache # vzctl exec 103 ping -c1 91.121.8.13
PING 91.121.8.13 (91.121.8.13) 56(84) bytes of data.
64 bytes from 91.121.8.13: icmp_seq=1 ttl=64 time=0.073 ms

--- 91.121.8.13 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.073/0.073/0.073/0.000 ms

opline cache # vzctl exec 103 ping -c1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.090 ms

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.090/0.090/0.090/0.000 ms

opline cache # vzctl exec 101 ping -c1 192.168.0.3
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=1 ttl=64 time=0.079 ms

--- 192.168.0.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.079/0.079/0.079/0.000 ms

opline cache # ping -c1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.064 ms

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.064/0.064/0.064/0.000 ms
opline cache # ping -c1 192.168.0.3
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=1 ttl=64 time=0.062 ms

--- 192.168.0.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.062/0.062/0.062/0.000 ms
opline cache # cat /etc/resolv.conf
# Generated by dhcpcd for interface eth0
nameserver 127.0.0.1
nameserver 213.186.33.99
opline cache # ping -c1 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.
64 bytes from 213.186.33.99: icmp_seq=1 ttl=63 time=0.152 ms

--- 213.186.33.99 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.152/0.152/0.152/0.000 ms

mais :
opline cache # vzctl exec 103 ping -c1 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.

--- 213.186.33.99 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

or :
opline cache # vzctl exec 101 ping -c1 213.186.33.99
PING 213.186.33.99 (213.186.33.99) 56(84) bytes of data.
64 bytes from 213.186.33.99: icmp_seq=1 ttl=62 time=0.254 ms

--- 213.186.33.99 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.254/0.254/0.254/0.000 ms


opline cache # vzctl exec 101 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.0.2.0       0.0.0.0         255.255.255.0   U     0      0        0 venet0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.0.2.1       0.0.0.0         UG    0      0        0 venet0
opline cache # vzctl exec 103 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.0.2.0       0.0.0.0         255.255.255.0   U     0      0        0 venet0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.0.2.1       0.0.0.0         UG    0      0        0 venet0

opline cache # vzctl exec 101 ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:756 (756.0 B)  TX bytes:756 (756.0 B)

opline cache # vzctl exec 103 ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.0.3  P-t-P:192.168.0.3  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:336 (336.0 B)  TX bytes:420 (420.0 B)

Je n'y comprends rien.
En fait, mon but n'est pas d'installer un 2ème template gentoo, mais un template debian. Or, avec, j'ai de gros problèmes réseaux (pire qu'ici) donc je tente de passer par cette étape que j'étais censé mieux maitriser.

Merci d'avance à celui qui voudra bien m'aider. Je ne continue pas à balancer tout ce que j'ai déjà fait ici, ça rendrait le post encore plus lourd et illisible, mais je suis évidemment à votre disposition pour de plus amples détails.

[Updated on: Fri, 12 June 2009 04:54]

Report message to a moderator

Re: réseau vers l'extérieur [message #36346 is a reply to message #36345] Fri, 12 June 2009 04:53 Go to previous message
novazur is currently offline  novazur
Messages: 11
Registered: June 2009
Junior Member
Et bien entendu, cela ne tenait pas à openvz, mais à shorewall sur le VN qu'il me faut relancer à chaque nouvelle ip créée.
Je vais faire des recherches pour voir de quoi cela vient mais si quelqu'un a une idée, je suis preneur.
Previous Topic: NFS Client sous Lenny (2.6.26)
Next Topic: Réseau vers l'exterieur d'un vz à l'interieur d'une virtualbox
Goto Forum:
  


Current Time: Sun Apr 28 05:12:29 GMT 2024

Total time taken to generate the page: 0.02560 seconds