OpenVZ Forum


Home » General » Support » VENET, VETH + SNAT
Re: VENET, VETH + SNAT [message #7679 is a reply to message #7660] Fri, 20 October 2006 07:07 Go to previous messageGo to previous message
chinaman is currently offline  chinaman
Messages: 15
Registered: August 2006
Junior Member
Ok, I took out of the bridge the eth1 interface for testing purpose. But now I got a bit confused with routing and SNAT. Here is what I did.

                                            +---------+
eth1 -------------- SNAT ---- veth104.0 ----| VPS 104 |
(222.140.33.246)                            +---------+
                                          (192.168.10.104)


I tried to setup SNAT as explained in Howto:
# iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth1 -j SNAT --to 222.140.33.246


I setup a route from HW to VPS 104
# ip r a 192.168.10.104 dev veth104.0

and inside VPS 104
ip r a default via 0.0.0.0 dev eth0

In this point I am not sure what should be the gateway in HW for VPS?

If I ping from VPS to HW external IP i get
From 192.168.10.104 icmp_seq=48 Destination Host Unreachable


Tcpdump inside HW shows
# tcpdump -i veth104.0
tcpdump: WARNING: veth104.0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on veth104.0, link-type EN10MB (Ethernet), capture size 96 bytes
14:50:31.240156 arp who-has 222.140.33.246 tell 192.168.10.104


What am I missing? Do I need to assign an IP to veth104.0 in HW?
Do I need to change something else? In Howto I read soemthing about problems with 2.6.8 kernel, and other problems with Debian. Maybe its importants to say that I am running Debian with 2.6.16 kernel.

[Updated on: Fri, 20 October 2006 07:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Startup script on slack
Next Topic: *SOLVED* vpsid shows no pid
Goto Forum:
  


Current Time: Wed Jul 31 02:19:08 GMT 2024

Total time taken to generate the page: 0.02768 seconds