Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adding port forwarding rule

Hi everyone,

I have an openstack setup and a RHEL VM running on it. The docs were really useful in guiding through the setup. I want to run a service on port 8000 of the VM and want that port to be forwarded from the host to the guest. Normally, I'd add a PREROUTING rule in the nat table to accomplish this. But I saw that iptables is already having some openstack specific rules and chains.

I wanted to know that for port forwarding - which is the right way to add an iptables rule - does it have to be done via some command line util or should I use an existing api to add a rule?

Thanks.

Adding port forwarding rulerule between host and VMs

Hi everyone,

I have an openstack setup and a RHEL VM running on it. The docs were really useful in guiding through the setup. I want to run a service on port 8000 of the VM and want that port to be forwarded from the host to the guest. For example, if a request comes on say - port 8111 on the host, then forward it to port 80 of VM1. If request comes on port 8112 on the host, then forward it to port 8080 of VM2 and so on.

Normally, I'd add a PREROUTING rule in the nat table to accomplish this. But I saw that iptables is already having some openstack specific rules and chains.

I wanted to know that for port forwarding - which is the right way to add an iptables rule - does it have to be done via some command line util or should I use an existing api to add a rule?

Thanks.