0

I have an Ubuntu 18.04.6 home server, connected via wifi (wlp2s0) to the internet. It has ip 192.168.1.13 on the local home network.

I want to connect a wired ethernet camera, that has a fixed ip of 192.168.1.99 when connected to the router. Now, I'd like to connect this camera to the home server via LAN (enp0s25), assign the camera ip 192.168.1.99, and share this camera over the wifi.

The connection works when ethernet is disconnected. When I connect the ethernet cable (between server and camera), though, I think the computer tries to connect to the internet through eth and internet stops working.

Only selecting "Use this connection only for resource on this network" for eth as suggested here does not work.

I followed the instructions here, and it would not work: the server either sees the camera, or is visible through the network, but never both. Then I figured it might be a priority issue and lowered the priority of wlan as suggested here. However it's still not working as I'd like it to.

Any other ideas please? Many thanks for your help.

Emos
  • 21

1 Answers1

1

I've found the answer thanks to Terrance and a million other posts I've read online, including this. The steps are:

  1. Launch Network Connections, e.g. by clicking on the network icon at the upper right and choosing "Edit Connections..."
  2. Choose "Add", select "Ethernet", and choose "Create..."
  3. Type any name, e.g. "Camera"
  4. Under the IPv4 Settings tab, change the Method drop-down to "Manual"
  5. Choose "Add" next to Addresses, and set Address to value on different subnet to your wifi. E.g, if your server is 192.168.1.2, set the ethernet manual ip to 192.168.2.2, and Netmask to 255.255.255.0; leave Gateway blank. The address is for the Ubuntu computer, so it should be different from the camera addresses. The wired ethernet and wifi network should be on separate subnets otherwise you can encounter routing problems.
  6. Leave DNS servers and routes fields empty
  7. Save and close
  8. Set the camera to manual ip as well, on the same subnet mask as the ethernet, e.g. in my example 192.168.2.3
  9. If you need to communicate between the subnets, make sure to uncomment the line:
net.ipv4.ip_forward=1

in /etc/sysctl.conf and then run "sudo sysctl -p" to reload the configuration.

Emos
  • 21