Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : Help Openvz7 Network Bridge Configuration



Threaded Mode | Print  

 Help Openvz7 Network Bridge Configuration, Ovh openvz7 abaout install and configuration (0 Replies, Read 8447 times)
yunusemretalay
Group: Member
Post Group: Newbie
Posts: 1
Status:
Hi everyone.

I have a server with ovh infrastructure. I've been struggling with openvz7 setup and settings for about 2 weeks . I completely installed on Centos 7 operating system.

I created virtual machines with commands, but whatever I do, virtual machines do not enter the internet. There is no explanatory information on the internet.

Before, I installed centos 6 and openvz 6 on my server and managed my server for 4 years with this system, it was really nice and easy.

As bridge systems have changed with Centos 7, I cannot solve it as before. If anyone knows, I would like to ask for help..


IP addresses are examples.


My server ip address: 152.7.209.202

My server

/etc/sysonfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
TYPE="Ethernet"
BRIDGE="br0"

/etc/sysconfig/network-scripts/ifcfg-br0

HWADDR=4a:62:b8:22:b7:e5
DEVICE="br0"
BOOTPROTO=static
IPADDR=152.7.209.202
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=152.7.209.254
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6ADDR=2609:5100:70:dca::/64
TYPE="Bridge"
DELAY="2"
STP="off"
UUID="5ae8feg2-97c5-5da2-7d86-f2e1b0272080"


ifconfig

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 152.7.209.202  netmask 255.255.255.0  broadcast 152.7.209.255
        inet6 fe80::4exx:bxxf:fexx:b3e4  prefixlen 64  scopeid 0x20<link>
        ether 4a:62:b8:22:b7:e5  txqueuelen 1000  (Ethernet)
        RX packets 199532  bytes 158615724 (151.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 85401  bytes 7241734 (6.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 4a:62:b8:22:b7:e5  txqueuelen 1000  (Ethernet)
        RX packets 309099  bytes 170258144 (162.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 85503  bytes 7929930 (7.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xfe500000-fe520000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4472  bytes 698407 (682.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4472  bytes 698407 (682.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

venet0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


prlsrvctl net add network

prlsrvctl net list

Network ID        Type      Bound To      Bridge        Slave interfaces
network          host-only                virbr1

brctl show

bridge name    bridge id              STP enabled    interfaces

br0            8000.4c72b926b3e4      no              eth0
host-routed            8000.000000000000      no
virbr1          8000.5254003001d7      no


prlctl set 100 --ipadd 192.168.1.2/24


Enable automatic reconfiguration for this network adapter.
Configure venet0 (+) type='routed' ips='192.168.1.2/255.255.255.0 '

Configured venet0 (+) type='routed' ips='192.168.1.2/255.255.255.0 '


The CT has been successfully configured.


prlctl set 100 --nameserver 8.8.8.8

The CT has been successfully configured.



/etc/vz/conf/100.conf

VERSION="2"

ONBOOT="yes"

PHYSPAGES="65536:65536"
SWAPPAGES="65536"

CPUUNITS="1000"

NETFILTER="full"

DISKSPACE="10485760:10485760"
DISKINODES="655360:655360"

QUOTATIME="0"

PLATFORM="linux"
NUMMEMORYSUBGROUPS="512"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE=".centos-7-x86_64"
ORIGIN_SAMPLE="basic"
TECHNOLOGIES="x86_64 nptl "
DISTRIBUTION="centos"
OSRELEASE="3.10.0"
VEID="100"
UUID="30a7a0fc-40f0-4255-82d9-c8c6f046434d"
IP_ADDRESS="192.168.1.2/255.255.255.0 "
NAMESERVER="8.8.8.8"

/etc/init.d/nat-vz

#!/bin/sh


case "$1" in
start) echo "Starting iptables NAT for openvz"
    #remplacer ip.de.votre_serveur.hote par l'ip de sortie
    iptables -t nat -A POSTROUTING -s 192.168.1.2/24 -o eth0 -j SNAT --to 152.7.209.202
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 1088 -j DNAT --to 192.168.1.2:22
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 2030 -j DNAT --to 192.168.1.2:2030
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 20 -j DNAT --to 192.168.1.2:20
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 31729 -j DNAT --to 192.168.1.2:21
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 25 -j DNAT --to 192.168.1.2:25
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 26 -j DNAT --to 192.168.1.2:26
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 43 -j DNAT --to 192.168.1.2:43
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 53 -j DNAT --to 192.168.1.2:53
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 80 -j DNAT --to 192.168.1.2:80
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 110 -j DNAT --to 192.168.1.2:110
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 143 -j DNAT --to 192.168.1.2:143
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 443 -j DNAT --to 192.168.1.2:443
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 465 -j DNAT --to 192.168.1.2:465
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 873 -j DNAT --to 192.168.1.2:873
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 993 -j DNAT --to 192.168.1.2:993
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 995 -j DNAT --to 192.168.1.2:995
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 2031 -j DNAT --to 192.168.1.2:2031
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 3306 -j DNAT --to 192.168.1.2:3306
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 587 -j DNAT --to 192.168.1.2:587
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 2082 -j DNAT --to 192.168.1.2:2082
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 953 -j DNAT --to 192.168.1.2:953
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 35000 -j DNAT --to 192.168.1.2:35000
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  tcp --dport 50000 -j DNAT --to 192.168.1.2:50000
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 1088 -j DNAT --to 192.168.1.2:22
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 2030 -j DNAT --to 192.168.1.2:2030
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 20 -j DNAT --to 192.168.1.2:20
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 31729  -j DNAT --to 192.168.1.2:21
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 25 -j DNAT --to 192.168.1.2:25
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 26 -j DNAT --to 192.168.1.2:26
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 43 -j DNAT --to 192.168.1.2:43
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 53 -j DNAT --to 192.168.1.2:53
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 80 -j DNAT --to 192.168.1.2:80
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 110 -j DNAT --to 192.168.1.2:110
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 143 -j DNAT --to 192.168.1.2:143
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 443 -j DNAT --to 192.168.1.2:443
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 465 -j DNAT --to 192.168.1.2:465
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 873 -j DNAT --to 192.168.1.2:873
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 993 -j DNAT --to 192.168.1.2:993
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 995 -j DNAT --to 192.168.1.2:995
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 2031 -j DNAT --to 192.168.1.2:2031
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 3306 -j DNAT --to 192.168.1.2:3306
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 587 -j DNAT --to 192.168.1.2:587
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 2082 -j DNAT --to 192.168.1.2:2082
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 953 -j DNAT --to 192.168.1.2:953
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 35000 -j DNAT --to 192.168.1.2:35000
    iptables -t nat -A PREROUTING -i eth0 -d 152.7.209.202 -p  udp --dport 50000 -j DNAT --to 192.168.1.2:50000
    ;;
stop) echo "Stopping iptables NAT for openvz"
    #remplacer ip.de.votre_serveur.hote par l'ip de sortie

    #mettre les regles iptables de supression pour la redirection de port

    ;;
*) echo "Usage: /etc/init.d/nat-vz {start|stop}"
    exit 2
    ;;
esac
exit 0


my ct 101 conf

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=188.120.143.167
GATEWAY=152.7.209.1
ARP=yes
HWADDR=03:00:00:78:fa:f1


/etc/sysconfig/network-scripts/route-eth0


152.7.209.1 dev eth0
default via 152.7.209.1 dev eth0

/etc/resolv.conf

search 8.8.8.8
nameserver 8.8.4.4


I've read thousands of articles. please help me.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 19, 2024, 5:55 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.023