ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.38k stars 860 forks source link

ip/ifconfig not working, needs netlink #145

Open bc1bb opened 5 years ago

bc1bb commented 5 years ago

Hello, I have tested ~20 packages today and I found some interesting things about ip and ifconfig on iSH : ip route get 1 give me ip: socket(AF_NETLINK,3,0): Invalid argument ifconfig give me

iPad~# ifconfig                                                                                                                       
ifconfig: /proc/net/dev: No such file or directory                                                                                         
ifconfig: ioctl 0x8912 failed: Invalid argument

I found no issue related to this

tbodt commented 5 years ago

There's no need for these to work, as network connectivity is managed by iOS. Still, I should make them return better errors.

bc1bb commented 5 years ago

We can't get local IP on iOS without going to settings ? It would be useful

tbodt commented 5 years ago

That would be pretty useful actually.

DominikTo commented 5 years ago

Output from ifconfig would still be handy. :)

marksergeant commented 5 years ago

Regarding this, when using iSH with F5, it doesn’t know of routes coming in via the VPN, and as such I’m unable to ssh to machines in the VPN network.

Koororo commented 4 years ago

If ish does not have IP, then SSH cannot be used?

tbodt commented 4 years ago

SSH and internet works fine. The only thing that doesn't work is the ip and ifconfig commands.

riverhxz commented 4 years ago

SSH and internet works fine. The only thing that doesn't work is the ip and ifconfig commands.

The difference is that if the mobile phone can access the alpine system through network, we could have the inside system to do many things, like establishing an ssh tunnel and using the tunnel to proxy the mobile phone network. Just like a accessable local backend.

tbodt commented 4 years ago

ssh tunneling should work fine.

riverhxz commented 4 years ago

is there any way that other apps could access the tunnel ?

tbodt commented 4 years ago

What are you trying? What does it do instead of working?

riverhxz commented 4 years ago

Sorry, the network works fine. I can access the localhost port. Another issue is the tunnel need background data refresh.

authorisation commented 2 years ago

Any progress on this?

WillBishop commented 2 years ago

Bump

redneckanarchist commented 2 years ago

Ifconfig is obsolete for iSH, it would be iplink && ip a to display network devices. 'AF_NETLINK missing socket' displayed due to config repository not added. Make sure you have drivers installed Run 'apk add linux-firmware' for drivers add config repo.. and setup lo loop back in networking.

b177y commented 11 months ago

Hi @Tmero2, would you be able to clarify your comment? I have run apk add linux-firmware but I'm still getting the error ip: socket(AF_NETLINK,3,0): Invalid argument.

I am trying to understand:

  1. "add config repo" - is there any documentation on this config repo and how to add it?
  2. "setup lo loopback" - does this happen automatically when installing linux-firmware, or is it a separate step? If it is another manual step is this the same as adding a loopback device on standard linux, or are there any additional steps for iSH?

Thanks

reanimat0r commented 10 months ago

Hi @Tmero2, would you be able to clarify your comment? I have run apk add linux-firmware but I'm still getting the error ip: socket(AF_NETLINK,3,0): Invalid argument.

I am trying to understand:

  1. "add config repo" - is there any documentation on this config repo and how to add it?
  2. "setup lo loopback" - does this happen automatically when installing linux-firmware, or is it a separate step? If it is another manual step is this the same as adding a loopback device on standard linux, or are there any additional steps for iSH?

Thanks

It appears that @Tmero2 has been inactive on Github since he first signed up, back in May of last year. That comment above is only 1 of 2 tangible footprints he'd left on this network thus far.

So it's back to a bit more of the good ole google-fu exercise routine.

Unless of course the man himself @tbodt -->>> the original Dev, would kindly care to chime in.

Cheers, fellas!

Abo5 commented 7 months ago

This script create by Abo5 using python

To get your ip in ish app do this steps

Usage:

cat > get-my-ip.py
import socket

#creating a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

#sending a dummy packet to a public DNS server
s.connect(("8.8.8.8", 80))

#getting the local IP address
ip = s.getsockname()[0]

#printing the IP address
print("Your IP address is:", ip)

#closing the socket connection
s.close()

and run the script

python3 get-my-ip.py

output is

Your IP address is: 192.168.1.100
developmentmachine commented 1 month ago

If the ifconfig command does not work,we cannot get the network interface,it's important for serving socks5 server.Actually,I need to install sockd in my iphone indeed.Please give me some advices or resolve this issue.

Danicespedes commented 1 month ago

Anyone with a workaround to get the full information from /etc/network/interfaces? thanks to that pyhton script at least i could get the ip but still i cant run a simple arp scan or connect to openssh