I have a virtual machine installed with the output:
ifconfig | grep -A1 enp
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255
I run the command: ssh -fND 8080 username@host
on this virtual machine. I need to route all virtual machine traffic through 127.0.0.1:8080
using iptables
. How can I do that?