Access Internet from private IP CT [message #39457] |
Mon, 26 April 2010 16:29 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Mistery
Messages: 8 Registered: August 2009
|
Junior Member |
|
|
Hi,
I'm trying to make a private IP CT access the Internet with no success.
My CT has been assigned two private IP addresses, the first one 10.0.0.X needed to access other CTs on the same HN in the same IP network class and another IP 172.31.1.x to access a private LAN connected to eth1 on the HN
The container access to both networks quite well, however now I need to make it access Internet withouth assigning a public IP (I don't need accessing the container from the Internet).
Can anyone explain how to configure the networking in the CT and/or HN ? I tried the solution posted in howto (SNAT) but it's not working in my case.
Current CT networking setup is the following:
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:29486 errors:0 dropped:0 overruns:0 frame:0
TX packets:29486 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10798708 (10.2 MiB) TX bytes:10798708 (10.2 MiB)
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:642939 errors:0 dropped:0 overruns:0 frame:0
TX packets:482619 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:658209445 (627.7 MiB) TX bytes:124846431 (119.0 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:10.0.0.3 P-t-P:10.0.0.3 Bcast:10.0.0.3 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.31.1.244 P-t-P:172.31.1.244 Bcast:172.31.1.244 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
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
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
0.0.0.0 192.0.2.1 0.0.0.0 UG 0 0 0 venet0
Host network config:
eth0 Link encap:Ethernet HWaddr 00:1B:78:A3:2F:B2
inet addr:151.1.157.21 Bcast:151.1.159.255 Mask:255.255.252.0
inet6 addr: fe80::21b:78ff:fea3:2fb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:896096553 errors:0 dropped:0 overruns:0 frame:0
TX packets:36098719 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2378689000 (2.2 GiB) TX bytes:2811631736 (2.6 GiB)
Interrupt:169 Memory:dc300000-dc310000
eth1 Link encap:Ethernet HWaddr 00:1B:78:A3:2F:B3
inet addr:172.31.1.21 Bcast:172.31.1.127 Mask:255.255.255.128
inet6 addr: fe80::21b:78ff:fea3:2fb3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:353568 errors:0 dropped:0 overruns:0 frame:0
TX packets:419356856 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:316875901 (302.1 MiB) TX bytes:1646371052 (1.5 GiB)
Interrupt:82 Memory:dc400000-dc410000
eth1:0 Link encap:Ethernet HWaddr 00:1B:78:A3:2F:B3
inet addr:172.31.1.245 Bcast:172.31.1.255 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:82 Memory:dc400000-dc410000
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:91 errors:0 dropped:0 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10618 (10.3 KiB) TX bytes:10618 (10.3 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:458094351 errors:0 dropped:0 overruns:0 frame:0
TX packets:896521503 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3194451783 (2.9 GiB) TX bytes:80530959 (76.8 MiB)
Host routing table:
172.31.1.244 dev venet0 scope link
10.0.0.1 dev venet0 scope link
10.0.0.3 dev venet0 scope link
10.0.0.2 dev venet0 scope link
172.31.1.243 dev venet0 scope link
172.31.1.240/28 dev eth1 proto kernel scope link src 172.31.1.245
172.31.1.0/25 dev eth1 proto kernel scope link src 172.31.1.21
151.1.156.0/22 dev eth0 proto kernel scope link src 151.1.157.21
169.254.0.0/16 dev eth1 scope link
default via 151.1.159.254 dev eth0
Thanks in advance
[Updated on: Thu, 29 April 2010 05:32] Report message to a moderator
|
|
|
|