Welcome to the Linux Foundation Forum!

IP Table with single interface

TeoHeras
TeoHeras Posts: 1
edited February 2017 in Network Management

I need to set up Linux to forward traffic for specific hosts.  My VM only has one NIC.   I’m struggling to get IPTables to work.  Is it because of the single NIC?  Is it just plain easier to do with 2 NIC’s?

My goal:

when I try to SSH or HTTP, or * to 10.0.0.7, the traffic goes to 10.0.0.5 (router takes care of this).  Have 10.0.0.5 forward the traffic to 10.0.0.7.

​What I ran:

iptables -A FORWARD -s 0/0 -i eth0 -d 10.0.0.7 -o eth0 -p TCP -j ACCEPT

Categories

Upcoming Training