Connecting Arduino Mega directly to Ubuntu pc - Arduino Web Server not found

choose a different network number for the cable to Arduino then on your main network.
if you use 192.168.1.x for network to Arduino, the main network addresses can't be 192.168.1.x