Transparent IP Address ?

qheart

New Member
Apr 29, 2014
2
0
1
Hello,

I need help to configure transparent IP address

Here, My Proxmox 3.4 Network Configuration :
# For Local IP Address
auto vmbr0
iface vmbr0 inet static
address 10.10.1.6
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0

# For Public IP Address
auto vmbr1
iface vmbr1 inet static
address X.x.x.x
netmask 255.255.255.248
gateway x.x.x.x
bridge_ports eth1
bridge_stp off
bridge_fd 0​

Here My KVM Linux network configuration
iface eth0 inet static
address 10.10.1.23
netmask 255.255.255.0
network 10.10.1.0
broadcast 10.10.1.255
gateway 10.10.1.1​

In Proxmox Box, i configured port forwarding to redirect port 80 IP Public x.x.x.x to 10.10.1.23
iptables -t nat -A PREROUTING -p tcp -i vmbr1 -m tcp -d x.x.x.x --dport 80 -j DNAT --to-destination 10.10.1.23:80
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

It's work,
===== but in KVM Linux
root@server:~# netstat -ntu
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.10.1.23:80 10.10.1.6:51985 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:53212 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51238 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51782 ESTABLISHED

I would like detect public IP in Foreign Address, how to configure transparent port ip and port forwarding in proxmox host ?
 
In Proxmox Box, i configured port forwarding to redirect port 80 IP Public x.x.x.x to 10.10.1.23
iptables -t nat -A PREROUTING -p tcp -i vmbr1 -m tcp -d x.x.x.x --dport 80 -j DNAT --to-destination 10.10.1.23:80
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

It's work,
===== but in KVM Linux
root@server:~# netstat -ntu
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.10.1.23:80 10.10.1.6:51985 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:53212 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51238 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51782 ESTABLISHED

I would like detect public IP in Foreign Address, how to configure transparent port ip and port forwarding in proxmox host ?

Instead of

iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

run


iptables -t nat -A POSTROUTING -s 10.0.1.23 -p tcp ! -d 10.0.1.0/24 --sport 80 -j SNAT --to-source x.x.x.x
 
Thanks for the information.

Hello,

I need help to configure transparent IP address

Here, My Proxmox 3.4 Network Configuration :
# For Local IP Address
auto vmbr0
iface vmbr0 inet static
address 10.10.1.6
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0

# For Public IP Address
auto vmbr1
iface vmbr1 inet static
address X.x.x.x
netmask 255.255.255.248
gateway x.x.x.x
bridge_ports eth1
bridge_stp off
bridge_fd 0​

Here My KVM Linux network configuration
iface eth0 inet static
address 10.10.1.23
netmask 255.255.255.0
network 10.10.1.0
broadcast 10.10.1.255
gateway 10.10.1.1​

In Proxmox Box, i configured port forwarding to redirect port 80 IP Public x.x.x.x to 10.10.1.23
iptables -t nat -A PREROUTING -p tcp -i vmbr1 -m tcp -d x.x.x.x --dport 80 -j DNAT --to-destination 10.10.1.23:80
iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

It's work,
===== but in KVM Linux
root@server:~# netstat -ntu
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.10.1.23:80 10.10.1.6:51985 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:53212 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51238 ESTABLISHED
tcp 0 0 10.10.1.23:80 10.10.1.6:51782 ESTABLISHED

I would like detect public IP in Foreign Address, how to configure transparent port ip and port forwarding in proxmox host ?
 

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!