I need help creating a rule to do the following:

Forward my ftp traffic to my virtual machine
I have eth0 as the main IP, and virb0 as a bridge to
the vm at a private ip. Any idea how to forward
ftp traffic to my servers address to the vm?

Example

Server - 192.168.1.1
Bridge - 192.168.100.1
Vm - 192.168.100.5

so ftp://192.168.1.1 will get the ftp data from 192.168.100.5

thanx

Something like this might work:

iptables -t nat -A PREROUTING -p tcp -d 192.168.1.1 --destination-port 21 -j DNAT --to-destination 192.168.100.5:21

This should forward port 21 pointed at 192.168.1.1 and direct it to 192.168.100.5.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.