right now im the ip address of the server is changing every few hours, is there anyway to have a one ip address? and if not, what is the range of ip addresses? I need it for whitelisting
right now im the ip address of the server is changing every few hours, is there anyway to have a one ip address? and if not, what is the range of ip addresses? I need it for whitelisting
No, it's not possible to get a fixed ip address. You can use ipify to look up the ip address of the machine you're on and then use that to update your whitelist.
That doesn't work (now?) on pythonanywhere, this is the result:
from ipify import get_ip
Result:
ImportError: cannot import name 'linux_distribution' from 'platform' (/usr/lib/python3.8/platform.py)
What is the full traceback?
I'm still experiencing this issue, any resolution? stack trace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jacobdunning2/.local/lib/python3.10/site-packages/ipify/__init
__.py", line 31, in <module>
from .ipify import get_ip
File "/home/jacobdunning2/.local/lib/python3.10/site-packages/ipify/ipify.
py", line 14, in <module>
from .settings import API_URI, MAX_TRIES, USER_AGENT
File "/home/jacobdunning2/.local/lib/python3.10/site-packages/ipify/settin
gs.py", line 9, in <module>
from platform import mac_ver, win32_ver, linux_distribution, system
ImportError: cannot import name 'linux_distribution' from 'platform' (/usr/l
ocal/lib/python3.10/platform.py)
Looks to be a known bug in ipify https://github.com/sindresorhus/ipify/issues/20