Return of vm ip information

zaltvapp

New Member
May 3, 2020
2
1
3
35
hello,

I have a little problem where I needed to understand how to configure, I have a monitor that captures attacks that x IP receives, but the monitor is returning with the main IP of the proxmox server and not the IP of the virtual machine, it's like all machines use the main IP of the server and which in practice is not using, all machines are online each one with its IP, my problem would be just not to return the correct IP remote, something like:

<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
exit;

?>

--------------

$_SERVER['REMOTE_ADDR']

This would return the IP remote and is returning the main IP of the host, this does not happen in virtualizations of vmware for example, I believe it has some connection with the bridge connection. If anyone can help me, I will be very grateful, the server is from OVH I am using MAC OVH where I generate on the panel.

I'm waiting, thanks.
 
Last edited:
Hi!

Can you post your network config cat /etc/network/interfaces (obfuscated if necessary)?

Best
Dominic
 
=======================
SOLUTION IP PROMOX
=======================

iptables -t filter -A FORWARD -o vmbr0 -j ACCEPT
iptables -t filter -A FORWARD -i vmbr0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
iptables-save


# TO FIX AFTER REBOOT
apt-get install iptables-persistent


#SAVE
iptables-save > regras.rules

# LOAD
iptables-restore < regras.rules

(Solved, thank you).
 
  • Like
Reactions: Dominic

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!