Proxmox and Residential broadband

Step 1: Proxmox Setup

  1. Install Proxmox:
  1. Configure Network:
  • Set static IP for Proxmox host (e.g., 192.168.1.10)
  • Configure vmbr0 as the main bridge for LAN (192.168.1.0/24)
  • Create vmbr1 for VM network (10.0.0.0/24) This is where you host the lite node.
  1. Set Up NAT:
  • Enable IP forwarding: echo 1 > /proc/sys/net/ipv4/ip_forward
  • Add to /etc/sysctl.conf: net.ipv4.ip_forward = 1
  • Configure iptables for NAT:

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o vmbr0 -j MASQUERADE
4. Configure Port Forwarding:

  • On your router, forward desired ports to Proxmox host (192.168.1.10)
  • On Proxmox, set up iptables rules to forward to VMs:
auto vmbr1
iface vmbr1 inet static
address 10.0.0.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0

post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE

post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8545 -j DNAT --to 10.0.0.200:8545

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8545 -j DNAT --to 10.0.0.200:8545

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 41046 -j DNAT --to 10.0.0.200:41046

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 41046 -j DNAT --to 10.0.0.200:41046

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1723 -j DNAT --to 10.0.0.200:1723

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1723 -j DNAT --to 10.0.0.200:1723

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 51055 -j DNAT --to 10.0.0.200:51055

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 51055 -j DNAT --to 10.0.0.200:51055

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 993 -j DNAT --to 10.0.0.200:993

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 993 -j DNAT --to 10.0.0.200:993

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.0.0.200:443

post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to 10.0.0.200:443

post-up   iptables -t nat -A PREROUTING -i vmbr0 -p udp --dport 10000 -j DNAT --to 10.0.0.200:10000

post-down iptables -t nat -D PREROUTING -i vmbr0 -p udp --dport 10000 -j DNAT --to 10.0.0.200:10000

you can reload the routing tables by running ifreload -a at the cli on the proxmox host.

  1. Create VMs:
  • Use Proxmox web interface to create and manage VMs
  • Assign VMs to appropriate network (vmbr0 or vmbr1)
  1. Secure Your Setup:
  • Make sure to forward ports from your residential router to the public ip, study the above diagram to understand how the paths and forwards work.
  • Change default Proxmox password
  • Set up a firewall on Proxmox host
  • Keep Proxmox and VMs updated

Step 2: Diode Lite Node Setup

  1. Create Ubuntu VM:
  • Use Proxmox to create a new Ubuntu VM
  • Assign it to the appropriate network (e.g., 10.0.0.0/24)
  1. Install Snap:
  • Update system: sudo apt update && sudo apt upgrade -y
  • Install Snap: sudo apt install snapd -y
  1. Install Diode Lite Node:

sudo snap install diode-node --edge

  1. Configure Diode Node:
  • Set host IP:

sudo snap set diode-node host=10.0.0.X

Replace X with the VM’s IP in the 10.0.0.0/24 network

  • Set edge ports:

sudo snap set diode-node edge2-port=41046,1723,10000
5. Port Forwarding for Diode Node:

  • On Proxmox host, forward the Diode edge ports to the VM:

iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 41046 -j DNAT --to-destination 10.0.0.X:41046 iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1723 -j DNAT --to-destination 10.0.0.X:1723 iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10000 -j DNAT --to-destination 10.0.0.X:10000

Replace X with the VM’s IP in the 10.0.0.0/24 network

  • On your router, ensure these ports are forwarded to the Proxmox host
  1. Manage Diode Node:
  • View info: diode-node.info
  • Start service: sudo snap start diode-node
  • Stop service: sudo snap stop diode-node
  • Restart service: sudo snap restart diode-node

Once you get your head around the setup, with diode you literally can publish any service from proxmox out to the blockchain, no more hosting fees. Any questions let me know and happy to help.

2 Likes

James, thank you very much, my friend.

1 Like