Theoretically you can run Linux on iPhone according to this blog: https://konradybcio.pl/linuxona7/ But I don't know whether iPhone can be connected with ethernet.