Bridge + NAT + FW = no internet in LXC

Noppy1991

New Member
Jun 5, 2018
1
0
1
36
Proxmox interfaces:
hXXps://pastebin.com/0UWvW8QQ

LXC container:
lxc ip: 10.10.10.2/24
lxc gw: 10.10.10.1

Forwarded ports:
iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8888 -j DNAT --to 10.10.10.2:80

Firewall:
Datacenter:
FW: on
Input: 22->8006->DROP
Output: ACCEPT

Proxmox:
FW: on

LXC:
FW: on
FW on NIC: on
Input: 80->DROP
Output: ACCEPT


With this setup I am able to control forwarded ports on LXC, but internet in LXC does not working.
If I set LXC like:

LXC:
FW: on
FW on NIC: off
Input: 80->DROP
Output: ACCEPT

Internet in LXC is working, but forwarded ports are always opened.

Where can be a problem ?

I want internet in LXC and opened ports should be managed on enabled FW.


Thanks


EDIT:
Seems that only thing that is changed are these rules from iptables-save
hXXps://pastebin.com/45C4WTWp
 

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!