D
D
DVoropaev2018-07-27 11:00:54
linux
DVoropaev, 2018-07-27 11:00:54

How to forward traffic through linux?

There was a need to listen to all traffic from the IP camera that goes to the Internet.
The network looks like this: A
router connected to the Internet
Several computers and a switch are connected to the router.
On a DHCP router.
A camera is connected to the switch, and my computer (linux).
My IP: 192.168.0.10
Camera IP: 192.168.0.20
What I did:
manually registered on the camera as the default gateway my computer (192.168.0.10)
specified the Google server (8.8.8.8) as DNS)
I didn’t touch anything on the computer, the gateway default and DNS is 192.168.0.1
Started WireShark.
What is the problem:
I saw in Wireshark that the packets that go from the camera to the outside do not go further than my computer.
How to make the packets coming from the camera to the computer go further to the router?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2018-07-27
@Tabletko

On the switch, configure traffic mirroring from the camera port to the Linux port.

A
Alexander, 2018-07-27
@UPSA

1. If the switch is "smart", those are managed, you can try to make it send packets to your computer, and then listen to packets from 192.168.0.20 (NTOP should seem to read). It will probably pass if you find the old HUB, not SWITCH.
2. Play Firewall on your computer: Forward all packets from 192.168.0.20 to 192.168.0.1 (router). Make your computer an intermediate router.
Problem: why do you need a camera looking at the gateway - are you doing a replacement or port forwarding on the gateway? I mean - from outside someone will use the camera?

K
klim888, 2018-08-01
@klim888

Put everything back
On the server, run #tcpdump -i eth1 -n -s 0 host 192.168.0.20 -vvv -w /tmp/dump
feed /tmp/dump to the shark

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question