OpenVZ Forum


Home » General » Discussions » Container as router? (Using a container to replace a router host)
Container as router? [message #53801] Thu, 22 December 2022 19:45 Go to next message
jjs - mainphrame is currently offline  jjs - mainphrame
Messages: 42
Registered: January 2012
Member
I've replaced my gateway hardware with a Debian 10 openvz VM, and it works as it should.

That said, I think it would be more efficient to do this in an openvz container.

I created a Debian 10 container, connected it to the same internal and external bridged networks as the VM, applied the same iptables masquerade rule as on the VM, but the CT won't forward the packets.

This should be able to work, right? Is there some sort of "CT_CAN_FORWARD_PACKETS" boolean that I'm missing?



http://static.openvz.org/userbars/openvz-user.png

[Updated on: Thu, 22 December 2022 21:12]

Report message to a moderator

Re: Container as router? [message #53805 is a reply to message #53801] Tue, 03 January 2023 22:03 Go to previous messageGo to next message
jjs - mainphrame is currently offline  jjs - mainphrame
Messages: 42
Registered: January 2012
Member
Following up on my own post for posterity.

To enable NAT/forwarding, in addition to the customary "net.ipv4.ip_forward=1", I also had to:

1. Set NETFILTER="full" in the CT config
2. Turn off firewalld - the version shipped with RHEL 7 has problems with forwarding (I replaced firewalld with ufw)

The version of firewalld in RHEL 9 can forward traffic, so hopefully that won't be an issue in OVZ 9


http://static.openvz.org/userbars/openvz-user.png
Re: Container as router? [message #53812 is a reply to message #53801] Fri, 13 January 2023 08:14 Go to previous message
vzadmin is currently offline  vzadmin
Messages: 10
Registered: December 2008
Junior Member

Hey, if you are facing a tech problem, then you can visit eTechSupport.

If you are looking for an outsourced web hosting support provider, then you can visit eTechSupport, as eTechSupport is an outsourced web hosting support provider which helps you create your business/company to grow. If you see, they have all-time best tech support which will help you anytime. You just need to raise a ticket and they will help you out.


Previous Topic: Problematic VM migration between hosts
Next Topic: Multicast in OVZ CTs and VMs?
Goto Forum:
  


Current Time: Wed Feb 01 07:00:37 GMT 2023

Total time taken to generate the page: 0.00838 seconds