OpenVZ Forum


Home » General » Support » How to access private IPs from a container (How to access private IPs from a container)
Re: How to access private IPs from a container [message #37232 is a reply to message #37197] Thu, 27 August 2009 18:52 Go to previous messageGo to previous message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
in HW node add iptables rule smth like:
iptables -A POSTROUTING -s 1.2.3.5 -d 10.1.1.0/255.255.255.0 -j SNAT --to-source 10.1.1.1

where 1.2.3.5 is vps ip
10.1.1.0 your private network (change subnet mask as needed)
10.1.1.1 is ip of HN interface to the 10.1.1.0 network
or if some how you don't need such interface (going through gateway?) you can put ip 1.2.3.4
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dump broken in Debian 5 lenny?
Next Topic: Multiple /24's on a host and containers
Goto Forum:
  


Current Time: Fri Aug 15 01:36:06 GMT 2025

Total time taken to generate the page: 0.33603 seconds