Forward traffic on the same interface

Issues related to configuring your network
Post Reply
thomas95670
Posts: 6
Joined: 2017/10/24 07:58:46

Forward traffic on the same interface

Post by thomas95670 » 2017/10/24 08:06:56

Hello guys,

I want to do something very specific on my own network. I'll try to explain it.

I've Internet router with the following IP 192.168.0.1/24
Then, i've a device on my network for which i want to do some reverse engineering to understand who it works, this device can have any IP on the same network 192.168.0.X.

What i want is to use a virtual CentOS on my PC to analyse the network trafic of the device in question, my centos is virtual so it has just one IP on the same network 192.168.0.X and his gateway is 192.168.0.1

The question is, can i configure de Centos to do some routing or forwarding but only with one interface and one IP :

Device IP --> CentOS IP --> 192.168.0.1

I guess that, then, on the router 192.168.0.1, i need to configure a route to reply to my Device through the CentOS or configure a source NAT on the CentOS IP, but i don't know if a Linux system can forward trafic like i want.

Thanks in advance for your help and sorry for my english, i'm french.

Thomas

thomas95670
Posts: 6
Joined: 2017/10/24 07:58:46

Re: Forward traffic on the same interface

Post by thomas95670 » 2017/10/25 05:51:40

Hi,

I’ve found a solution. Juste enable ip forwarding, then need to manage the firewalld to allow the forwarding.

In my case, because it’s just for testing, i’ve turned it off. And now the CentOS works as routeur with only one interface.

NB : if you want to avoid ICMP redirect, turn off this feature ( same location than ip_forward)

Post Reply