0

I have a regular LAN adapter and a PoE adapter on my computer.

I have an IP camera connected to the PoE port and on the regular one I am connected to my router.

I can access my computer through the LAN adapter via its IP address (192.168.1.10) BUT I can't access the camera connected on the PoE port (192.168.0.90). I know it makes total sense since the camera is not on the local network and is bound to the computer only.

But I need to "expose it" to the other adapter so it connects to the same gateway and becomes available for me to reach it.

Which is the best way to achieve this? Thanks a lot!

1 Answer 1

1

So you have two networks: 192.168.1.0/24 and 192.168.0.0/24 (in CIDR notation) and you want to configure routing between them. This means every host on 192.168.1.0/24 must know how to reach 192.168.0.0/24.

The easiest way is to configure a static route on your Internet gateway, telling that 192.168.0.0/24 is reachable through 192.168.1.10. Every host sends to the default gateway packets it can not send directly. Your packets will bounce a little bit around, but they will reach their destination.

The Linux computer already knows how to reach both networks, but if you want it to route packets for others check if forwarding is active:

sysctl net.ipv4.ip_forward

and if it isn't (the value is 0), activate it:

sysctl net.ipv4.ip_forward=1

To make the change permanent add net.ipv4.ip_forward to /etc/sysctl.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .