How can I give real/external ip to vps..

  • Thread starter Thread starter maur
  • Start date Start date
M

maur

Guest
Howdy. ;)

Actually i have set vmbr0 on master node with ip 10.2.10.1 and vps with 10.2.10.11..

On master in iptables:
iptables -t nat -A PREROUTING -d 188.40.78.xx -i eth0 -j DNAT --to-destination 10.2.10.11
iptables -t nat -A POSTROUTING -s 10.2.10.11 -o eth0 -j SNAT --to 188.40.78.xx

But in this way - i can't set for example apache on vps to listen on 188.40.78.xx.. There's bridge possibility, but can't be used in my situation because of hetzner - they blocking traffic when detect different mac address...
After couple of days i will have ~10 ips and i want to use them on vps one or another..
So - there's any other, nicer option?
 
We use 1-to-1 nat in our DC without problems. Our firewall supports aliases on the WAN so we just assign the public IP's as aliases and then NAT them to the private IP of the server.

Would that work for you?
 
We use 1-to-1 nat in our DC without problems. Our firewall supports aliases on the WAN so we just assign the public IP's as aliases and then NAT them to the private IP of the server.

Would that work for you?

For now Im doing it the same way..
But let's say i have ip 80.10.10.1 on master host and 80.10.10.2 on vps.
In this way - NAT - i can't set apache on vps to serve some vhost on 80.10.10.2 ip address.. And unfortunelly i really need possibility to set some daemons on vps listens on some ip. I can do it with NAT but then i have to always remember that for example: 10.2.10.10 is always routed to 80.10.10.2, tell users about this..
Also - i want to give 6 ips to vps and for example outgoing mails should be sended from ip "connected" with mail domain.. With NAT it might be hard.

Anyway - some other ideas maybe...?