Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Install/Configure proxmox VE for NAT ipv4 VPS on Debian Wheezy (e.g. on online.net) - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Install/Configure proxmox VE for NAT ipv4 VPS on Debian Wheezy (e.g. on online.net)

2

Comments

  • @tr1cky said:
    You'd only have to change eth0 to vmbr0 in the vz-routing script.

    Really? I might do that instead then.

  • ndlong75ndlong75 Member
    edited August 2014

    could you guys review the solution for networking? i tried above instruction but was not successful.

  • @ndlong75 said:
    could you guys review the solution for networking? i tried above instruction but was not successful.

    Post your vz-routing script and your /etc/network/interfaces.
    Also, what IP-Address is assigned to the container?

  • ====the IP of container is 192.168.0.1
    root@vm:~# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
    UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
    RX packets:290 errors:0 dropped:0 overruns:0 frame:0
    TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:29092 (28.4 KiB) TX bytes:28904 (28.2 KiB)

    venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    inet addr:192.168.0.1 P-t-P:192.168.0.1 Bcast:192.168.0.1 Mask:255.255.255.255
    UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

    === /etc/init.d/vz-routing (+x)

    root@sd-263xx:~# cat /etc/init.d/vz-routing

    !/bin/sh

    case "$1" in
    start) echo .vz-routing started.

    It.s important that you change the SNAT IP to the one of your server (not the local but the internet IP)

    The following line adds a route to the IP-range that we will later assign to the VPS. That.s how you get internet access on # your VPS.

    /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o vmbr0 -j SNAT --to 195.154.xx.xx

    These are the rules for any port forwarding you want to do

    In this example, all traffic to and from the ports 11001-11019 gets routed to/from the VPS with the IP 10.0.0.1.

    Also the port 11000 is routed to the SSH port of the vps, later on you can ssh into your VPS through yourip:11000

    /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 11000 -j DNAT --to 192.168.0.1:22
    /sbin/iptables -t nat -A PREROUTING -i eth0 -p udp --dport 11001:11019 -j DNAT --to 192.168.0.1
    /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 11001:11019 -j DNAT --to 192.168.0.1

    ;;

    *) echo .Usage: /etc/init.d/vz-routing {start}.
    exit 2
    ;;

    esac
    exit 0

    ===== /etx/network/interfaces
    root@sd-263xx:~# cat /etc/network/interfaces

    This file describes the network interfaces available on your system

    and how to activate them. For more information, see interfaces(5).

    The loopback network interface

    auto lo

    iface lo inet loopback

    The primary network interface

    allow-hotplug eth0

    iface eth0 inet dhcp

  • tr1ckytr1cky Member
    edited August 2014

    You use eth0 for the node's interface, you have to change vmbr0 in the vz-routing script to eth0.
    /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o vmbr0 -j SNAT --to 195.154.xx.xx

  • @tr1cky said:
    You use eth0 for the node's interface, you have to change vmbr0 in the vz-routing script to eth0.
    /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o vmbr0 -j SNAT --to 195.154.xx.xx

    ==> it works. it is the only point that was unclear in your awesome tutorial. Thanks so much.

  • @ndlong75 said:
    ==> it works. it is the only point that was unclear in your awesome tutorial. Thanks so much.

    Oh, I just saw that it's in fact wrong in the tutorial, adjusted that.

    Thanked by 1ndlong75
  • and just chmod +x (the +x is missing)

  • @ndlong75 said:
    and just chmod +x (the +x is missing)

    Oops. Thanks, fixed that aswell.

  • It is weird. If I open the first shell, I can't ping it but if I open the second shell, I can ping it in the second shell.

  • nimdynimdy Member
    edited September 2014

    @tr1cky
    Do you know how I can schedule backups using snapshot mode rather than suspend mode?

  • Any idea how to add IPv6 to the openvz containers?

    Thanked by 1ndlong75
  • @joodle said:
    Any idea how to add IPv6 to the openvz containers?

    vzctl set  --ipadd [IPv6 Address w/CIDR notation Ex:2001:41d0:8:67d2::80/64] --save
    Thanked by 2BlazeMuis netomx
  • NeoonNeoon Community Contributor, Veteran
    dpkg: error processing proxmox-ve-2.6.32 (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     pve-cluster
     redhat-cluster-pve
     fence-agents-pve
     libpve-access-control
     clvm
     libpve-storage-perl
     qemu-server
     resource-agents-pve
     pve-manager
     vzctl
     proxmox-ve-2.6.32
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    Dosent works

  • I guess if you scroll up in your shell window you'll see that proxmox fails to bind to the correct IP-Address, that's why the tutorial also covers a solution to that. If you post your /etc/hosts and output of cat /etc/hostname I could surely help you.

  • NeoonNeoon Community Contributor, Veteran

    Yeah but the solution comes after you installed, so move it up.

    After i copied your script:

    root@sd-24053:/home/user# /etc/init.d/vz-routing start
    “Usage: /etc/init.d/vz-routing {start}”
    

    Basically it dosent works and when i bypass it i just get bunch of errors:

    Bad argument `–to'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–dport'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–dport'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–dport'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    Bad argument `–destination-port'
    Try `iptables -h' or 'iptables --help' for more information.
    
    Thanked by 1ndlong75
  • I'm sorry, the script got messed up by some conversion stuff of wordpress. It should work now.

  • netomxnetomx Moderator, Veteran

    Thanks!

  • linuxthefishlinuxthefish Member
    edited September 2014

    W: Failed to fetch ftp://download.proxmox.com/debian/dists/wheezy/Release Unable to find expected entry 'pve/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

    :((

    EDIT: nvm, installed 32bit debian!!

  • @linuxthefish said:
    W: Failed to fetch ftp://download.proxmox.com/debian/dists/wheezy/Release Unable to find expected entry 'pve/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

    :((

    Use a different mirror.

    Thanked by 1linuxthefish
  • @tr1cky

    Can you check this ?


    root@sd-24885:~# /etc/init.d/vz-routing start

    vz-routing started

    iptables v1.4.14: Bad IP address "ip"



    Try `iptables -h' or 'iptables --help' for more information.

  • socialssocials Member
    edited September 2014

    @StephenIzzy

    Did you really.. just.. blindly copy pasted this and didn't change it?

    /sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j SNAT --to ip-of-your-server

    You see nothing wrong with this command?

    Jesus, man.

  • @socials said:
    StephenIzzy

    Did you really.. just.. blindly copy pasted this and didn't change it?

    /sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j SNAT --to ip-of-your-server

    You see nothing wrong with this command?

    Jesus, man.

    Gotcha, You're right, i just copied & pasted that blindly :D

    Thank you for pointing me to that.

  • thanks, its work

  • extremezextremez Member
    edited September 2014

    any tutorial on kvm? I only get a black screen on console

  • @extremez said:
    any tutorial on kvm? I only get a black screen on console

    Proxmox should show you an error. What's proxmox showing you?

  • your site is giving ssl errors. carnt access it.

  • @TarZZ92 said:
    your site is giving ssl errors. carnt access it.

    You can still access it. You just have to ignore the warning. I switched the site to a free CloudFlare plan and the universal SSL certificate isn't pointing to the domain yet.

  • Any one knokw about how to setup promox NAT in google cloud platform VM?

    It's so difficult for me.

    I can't connect to vm ip address from internet.

    help me

  • @tr1cky said:
    its only show status as internal-error

Sign In or Register to comment.