具有多个公共IP的proxmox KVM路由网络 [英] proxmox KVM routed network with multiple public IPs

查看:167
本文介绍了具有多个公共IP的proxmox KVM路由网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和hetzner一起专门托管了.另外,我已经购买了6IP子网.

I have a dedicated hosting with hetzner. Additionally i have bought a 6IP subnet.

我的主要IP是:88.198.60.125我的主要子网是:255.255.255.224

My main IP is: 88.198.60.125 My main subnet is: 255.255.255.224

我的其他IP是46.4.214.81至46.4.214.86

My additional IPs are 46.4.214.81 to 46.4.214.86

Windows服务器上的Internet访问工作.但是centos给我无效的主机 我不能使用桥接模式,因为hetzner不允许在同一外部ip上使用多个MAC,因此我必须使用路由模式.这是我的主机的/etc/network/interfaces文件:

the internet access work on windows servers . but centos give me invalid host I cannot use bridged mode, since hetzner does not allow multiple MACs on same external ip, so I have to use routing mode. Here is my /etc/network/interfaces file for the host:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  88.198.60.125
        netmask  255.255.255.255
        pointopoint 88.198.60.97
        gateway  88.198.60.97
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

auto vmbr0
iface vmbr0 inet static
    address  88.198.60.125
    netmask  255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

    #subnet
    up ip route add 46.4.214.80/29 dev vmbr0
    up ip route add 46.4.214.81/29 dev vmbr0
    up ip route add 46.4.214.82/29 dev vmbr0
    up ip route add 46.4.214.83/29 dev vmbr0
    up ip route add 46.4.214.84/29 dev vmbr0
    up ip route add 46.4.214.85/29 dev vmbr0
    up ip route add 46.4.214.86/29 dev vmbr0
    up ip route add 46.4.214.87/29 dev vmbr0

这是我的虚拟机界面

auto eth0                                                                                   
 iface eth0 inet static                                                                        
 address 46.4.214.81                                                                        
 netmask 255.255.255.255                                                                     
 pointopoint 88.198.60.125                                                                  
 gateway 88.198.60.125  

推荐答案

好,这是我如何解决问题的方法 您需要特定要使用"up route add -host" 与WINDOWS SERVER一起使用的IP,而其他IP可以通过创建容器直接用于Linux....安装Linux手册无效与我一起 这是我的/etc/network/interfaces文件

ok this how I solved the problem you need to specific The IPs you want to use them with WINDOWS SERVER using "up route add -host" and other IPs can be used directly with Linux using create container....installing Linux manual not worked with me this is my /etc/network/interfaces file

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  88.198.60.125
        netmask  255.255.255.255
        pointopoint 88.198.60.97
        gateway  88.198.60.97
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

auto vmbr0
iface vmbr0 inet static
    address  88.198.60.125
    netmask  255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

    #subnet ips  used with windows server only
     up route add -host 46.4.214.80 dev vmbr0
     up route add -host 46.4.214.81 dev vmbr0
     up route add -host 46.4.214.82 dev vmbr0
     up route add -host 46.4.214.87 dev vmbr0

这篇关于具有多个公共IP的proxmox KVM路由网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆