How can I have internet in my container

  • Thread starter Thread starter Augustino
  • Start date Start date
A

Augustino

Guest
Hi

Hello

I follow many tutorial, manuals, and I can not get internet in my container :(

Can somebody say me? Please?;)

Best Regards
 
Hi

Hello

I follow many tutorial, manuals, and I can not get internet in my container :(

Can somebody say me? Please?;)

Best Regards

how did you install, from ISO? or do you get Proxmox VE form a hosting company?
 
I installed via repositories and aptitude of debian lenny in a personal computer

I assume you followed our wiki howto? configured the network on the host as described?

what template do you use, venet or veth?

pls post the output of /etc/network/interfaces (on the host and from the container)
 
Hey,

im facing the same problem here :)

/etc/network/interfaces (host)
Code:
cat /etc/network/interfaces
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth1
iface eth1 inet static
  address   xx.xxx.xx.205
  broadcast xx.xxx.xx.223
  netmask   255.255.255.224
  gateway   xx.xxx.xx.193

# default route to access subnet
up route add -net xx.xxx.xx.192 netmask 255.255.255.224 gw xx.xxx.xx.193 eth1
I installed proxmox over an existing lenny and experienced that promox changed my NIC from eth0 to eth1 so I changed above manually.

ifconfig -a (host)
Code:
ifconfig -a
eth1      Link encap:Ethernet  HWaddr 40:61:xx:xx:xx:xx  
          inet addr:xxx.xxx.xxx.205  Bcast:xxx.xxx.xxx.223  Mask:255.255.255.224
          inet6 addr: xxxx::xxxx:xxxx:fe2b:8844/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2567 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2036 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:271731 (265.3 KiB)  TX bytes:441938 (431.5 KiB)
          Interrupt:249 Base address:0x8000 

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:1317 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1317 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:392413 (383.2 KiB)  TX bytes:392413 (383.2 KiB)

venet0    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.206  P-t-P:88.198.57.206  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:14 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:941 (941.0 B)  TX bytes:0 (0.0 B)

Because Hetzner does not route extra IPs to your box automaticly i added xxx.xxx.xxx.206 to venet0 by using

Code:
ip addr add xxx.xxx.xxx.206 dev venet0

I also tried adding the ip to eth1, but it did not work either.

/etc/network/interfaces (vm)

Code:
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and /etc/network/interfaces.tail instead,
# their contents will be inserted at the beginning and at the end
# of this file, respectively.


# Auto generated interfaces
auto lo
iface lo inet loopback

auto venet0
iface venet0 inet static
    address 127.0.0.1
    netmask 255.255.255.255
    broadcast 0.0.0.0
    up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
    up route add default gw 192.0.2.1
auto venet0:0
iface venet0:0 inet static
    address xxx.xxx.xxx.206
    netmask 255.255.255.255
    broadcast 0.0.0.0

ifconfig -a (vm)
Code:
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: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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:941 (941.0 B)

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.206  P-t-P:xxx.xxx.xxx.206  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

/etc/sysctl.conf (host)
Code:
### Hetzner Online AG installimage
# sysctl config
#net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
    
#-- OpenVZ begin --#

# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0

# Enables source route verification
net.ipv4.conf.all.rp_filter = 1

# Enables the magic-sysrq key
kernel.sysrq = 1

# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0

# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

#-- OpenVZ end --#

lspci (host)
Code:
00:00.0 Host bridge: Intel Corporation QuickPath Architecture I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation QuickPath Architecture I/O Hub PCI Express Root Port 1 (rev 13)
00:03.0 PCI bridge: Intel Corporation QuickPath Architecture I/O Hub PCI Express Root Port 3 (rev 13)
00:07.0 PCI bridge: Intel Corporation QuickPath Architecture I/O Hub PCI Express Root Port 7 (rev 13)
00:14.0 PIC: Intel Corporation QuickPath Architecture I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation QuickPath Architecture I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation QuickPath Architecture I/O Hub Control Status and RAS Registers (rev 13)
00:14.3 PIC: Intel Corporation QuickPath Architecture I/O Hub Throttle Registers (rev 13)
00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 5
00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
02:00.0 VGA compatible controller: nVidia Corporation GeForce 8400 GS (rev a1)
04:00.0 RAID bus controller: 3ware Inc 9650SE SATA-II RAID (rev 01)
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

uname -r
2.6.24-9-pve