I'm posting here because I've got a server, and I want to redirect the port 2121 of my main interface (eth0) to the port 21 of my secondary interface (virbr0).
This is my configuration :
Physical server OS : Ubuntu Server 16.04 LTS, Firewall software : UFW v.0.35 Virtual Machine OS : Windows 7 Professional Hypervisor : OpenStack KVM (QEMU).
Server IP configuration :
eth0 address 91.121.XXX.XXX netmask 255.255.255.0 network 91.121.XXX.0 broadcast 91.121.XXX.255 gateway 91.121.XXX.254 virbr0 address 192.168.122.1 gateway 192.168.122.1
Server Routes configuration :
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 91.121.XXX.254 0.0.0.0 UG 0 0 0 eth0 91.121.XXX.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
UFW configuration :
I have followed these instructions : NAT and FORWARD with Ubuntu’s ufw firewall - https://gist.github.com/kimus/9315140
VM IP Configuration :
IP address : 192.168.122.59 GATEWAY : 192.168.122.1
This is that I want to do :
redirect 91.121.XXX.XXX:2121 to 192.168.122.59:21 (VM). eth0:2121 -> virbr0:21
Note : The VM is connected to the Internet, for some reasons, I want to access at the FTP (Typsoft) Server installed on it on port 21 .
The port 21 of my server is already on use by an other thing. And I want use the port 2121 to access the ftp server present on the VM.
Can you help me ?