Skip to content

Instantly share code, notes, and snippets.

@Digital-Daz
Digital-Daz / routed-vm-mesh-access.md
Created December 31, 2025 11:45 — forked from scyto/routed-vm-mesh-access.md
how to access proxmox ceph mesh from VMs on the same proxmox nodes

Give VMs Accesss to Ceph Mesh (routed not bridged access)

Version 0.9 (2025.04.29)

Routed is needed, you can't jut simply bridge en05 and en06 and have VMs work, bridging seems to not work on thundebolt interfaces, at least i could never get the interfaces working when bridged and it broke the ceph mesh completely.

tl;dr can't bridge thunderbolt interfaces

Goal

#!/usr/bin/perl
## Script written by Noah Guttman and Copyright (C) 2014 Noah Guttman. This script is released and distributed under the terms of the GNU General Public License
#Libraries to use
use warnings;
use strict;
use Getopt::Std;
use Time::HiRes qw(gettimeofday usleep);
use IO::Socket;
#!/usr/bin/perl
#########################################################
# multitest, by Marcus Sorensen, BetterServers Inc #
# Licensed under the Open Software License version 3.0 #
# http://opensource.org/licenses/OSL-3.0 #
#########################################################
use strict;
$| = 1;
my $colors = { red => "\e[1;31m", def => "\e[0m", green => "\e[1;32m", cyan => "\e[1;36m" };
-A INPUT -s 15.177.0.0/18 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.80.197.0/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.80.197.128/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.80.198.0/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.83.34.128/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.83.35.0/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 52.83.35.128/25 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 54.248.220.0/26 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 54.250.253.192/26 -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -s 54.251.31.128/26 -p tcp -m tcp --dport 5060 -j ACCEPT
#!/bin/sh
/usr/bin/wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key add -
/bin/echo "deb http://deb.kamailio.org/kamailio52 stretch main" > /etc/apt/sources.list.d/kamailio.list
/bin/echo "deb-src http://deb.kamailio.org/kamailio52 stretch main" >> /etc/apt/sources.list.d/kamailio.list
/usr/bin/apt update
/usr/bin/apt --assume-yes install kamailio kamailio-redis-modules kamailio-postgres-modules redis-server
/usr/bin/wget https://gist.githubusercontent.com/DigiDaz/5c2c9224bf9e94e207a6cc6026ff43c1/raw/3557017b7bc88745c946b61dbc44f146081de57c/whitelist-kamailio.cfg -O /etc/kamailio/kamailio.cfg
LOCAL_IP_V4=`fs_cli -x 'eval ${local_ip_v4}'`
/bin/sed -i "s/YYYYYYYYYY/$LOCAL_IP_V4/" /etc/kamailio/kamailio.cfg
DB_PASSWORD=$(cat /etc/fusionpbx/config.php | grep db_password | awk '{print $3}' | sed "s/['|';]//g")
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.1rsMAj/crontab installed on Sun Aug 11 23:52:16 2019)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
#!/bin/sh
/bin/systemctl stop kamailio
/usr/bin/redis-cli flushdb
/sbin/iptables-restore < /etc/iptables/rules.v4
/bin/systemctl restart fail2ban
/bin/systemctl start kamailio
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
After=redis.service
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v5.2 - default configuration script
# - web: https://www.kamailio.org
# - git: https://github.com/kamailio/kamailio
#
# Direct your questions about this file to: <sr-users@lists.kamailio.org>
#
# Refer to the Core CookBook at https://www.kamailio.org/wiki/
# for an explanation of possible statements, functions and parameters.