P
P
pavelpasha2018-07-03 21:02:05
ubuntu
pavelpasha, 2018-07-03 21:02:05

How to route a request to a different subnet?

Good afternoon. I have a Raspberry PI. An IP camera is connected to the Ethernet interface. The Raspberry is also connected to the home network via Wi-Fi. You need to access the camera from your home network.
The camera address is 192.168.1.11 and the home subnet is 192.168.0.x. Therefore, it is necessary to redirect a request like 192.168.0.11 to 192.168.1.11. Is it possible?
5b3bce765b679525355962.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
vreitech, 2018-07-03
@pavelpasha

enable ip forwarding on raspberry: www.ithowto.ru/75-kak-vklyuchit-ip-forwarding-v-li...
on home subnet computers add route to 192.168.1.0/24 network:

route -p add 192.168.1.0 mask 255.255.255.0 192.168.0.99
, where 192.168.0.99is the raspberry's ip address on the home network.
on the ip camera, set the raspberry address on the network with the camera as the gateway.

A
Andrey Burov, 2018-07-03
@BuriK666

You can give the camera an ip from the 192.168.0.0/24 subnet and enable proxy_arp on the raspberry pi xgu.ru/wiki/Proxy_ARP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question