Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Multiple FO IPs in a VM on top of Proxmox -> OVH Dedicated Server
- I have a cPanel (CloudLinux 7) VM running in Proxmox on top of a dedicated server with OVH. I've managed to get one FailOver IP working on it just fine, but none of the tutorials online describe how to do it when it comes to multiple FO IPs from multiple IP blocks attached to the server.
- ++++++++++++++
- list of top cheapest host http://Listfreetop.pw
- Top 200 best traffic exchange sites http://Listfreetop.pw
- free link exchange sites list http://Listfreetop.pw
- list of top ptc sites
- list of top ptp sites
- Listfreetop.pw
- Listfreetop.pw
- +++++++++++++++
- I attempted to address this by creating multiple network interfaces from vmbr0 and assigning each one of them a single vMAC (the same ones generated by OVH). Then I copied the ifcfg-eth0 file into "ifcfg-eth1", replaced the IP and gateway in it to no avail, the eth1 interface (where the second FO IP is tied to) won't ping the outside world or the other way around.
- Having to keep multiple virtual NICs just for the sake of having multiple IPs doesn't seem like a very elegant solution, so I suppose I'm way off here. I was thinking of having one interface with multiple VLANs inside the VM, one for each IP or something along those lines.
- Any assistance is greatly appreciated.
- php example :
- /**
- * get client ip
- * @Param integer $type 0:ip 1 :num
- * @return mixed
- */
- function get_client_ip($type = 0) {
- $type = $type ? 1 : 0;
- static $ip = NULL;
- if ($ip !== NULL) return $ip[$type];
- if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
- $pos = array_search('unknown',$arr);
- if(false !== $pos) unset($arr[$pos]);
- $ip = trim($arr[0]);
- }elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
- $ip = $_SERVER['HTTP_CLIENT_IP'];
- }elseif (isset($_SERVER['REMOTE_ADDR'])) {
- $ip = $_SERVER['REMOTE_ADDR'];
- }
- $long = sprintf("%u",ip2long($ip));
- $ip = $long ? array($ip, $long) : array('0.0.0.0', 0);
- return $ip[$type];
- }
- $ip= get_client_ip();
- //------------------------------------------------------
- SaveToFile("/tmp/iplisting.txt", $ip);
- Header("Location home.php");
- php example :
- /**
- * get client ip
- * @Param integer $type 0:ip 1 :num
- * @return mixed
- */
- function get_client_ip($type = 0) {
- $type = $type ? 1 : 0;
- static $ip = NULL;
- if ($ip !== NULL) return $ip[$type];
- if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
- $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
- $pos = array_search('unknown',$arr);
- if(false !== $pos) unset($arr[$pos]);
- $ip = trim($arr[0]);
- }elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
- $ip = $_SERVER['HTTP_CLIENT_IP'];
- }elseif (isset($_SERVER['REMOTE_ADDR'])) {
- $ip = $_SERVER['REMOTE_ADDR'];
- }
- $long = sprintf("%u",ip2long($ip));
- $ip = $long ? array($ip, $long) : array('0.0.0.0', 0);
- return $ip[$type];
- }
- $ip= get_client_ip();
- //------------------------------------------------------
- SaveToFile("/tmp/iplisting.txt", $ip);
- Header("Location home.php");
- host jobs
- imgmega.com
- fallout 1 make money
- hosting 2019 grammys
- domain mall
- domain information
- drupal 8 hosting free
- 3 host vsan
- ptp4ever.fr
- Thanks, but I'm not sure how this is related to this topic.
- Anyway, in case someone goes through the same situation, the solution was pretty straightforward: Proxmox's default settings work just fine for that purpose but you must use the same vMAC address for all IPs attached to the VM's public interface. I had no idea OVH's Manager V6 allowed that, it can be done through the "Use an existing Mac Address" option. Problem solved.
Advertisement
Add Comment
Please, Sign In to add comment