I'm trying to forward a port through OpenVPN (with Ethernet Bridging) but I can't.
Below is a "simple" network diagram. A server contains 2 virtual machines, the principal server is connected with OpenVPN to another server. I need forward a port from 10.10.10.2
(a Virtual Machine) to public IP of the external server with IP 10.10.10.11
(see diagram).
The bridge vmbr0
is including a three interfaces: tap0
, eth0
(public IP) and vlan1
(10.10.10.0/24
).
The rule I used in 10.10.10.11 server is
iptables -t nat -D PREROUTING -p tcp -d [public ip here] --dport 80 -j DNAT --to-destination 10.10.10.2:80
In the image below you can see that packets "enter" but not "exit" through the interface tap0
.
This is a dump of tap0
interface:
The packets are entering correctly from tap0
, but packets are routed to vmbr0
and never get to tap0
.
How can I resolve this problem?
iptables
(?).iptables -t nat -D PREROUTING -p tcp -d [public ip here] --dport 80 -j DNAT --to-destination 10.10.10.2:80