Assign static IP address

Resakra

Member
Credits
319
I asked my isp for static IP address and they provided me one with (compromised) folllowing info:
Ip: 4x.xx.10x.x
DG: 4x.xx.10x.x
DNS 1: xx.xxx.xxx.xx
DNS 2: xxx.xxx.xxx.xx
I have tried to edit netplan file manger from this one, which is almost blanked:
1602759407700.png

to this one, meanwhile minding the indentation on the text editor bcz of python:
Selection_008.png

and that throws this error, with
Selection_011.png
:
Selection_010.png

strange numbers given by my isp to setup (starting with some of country's code, have not seen this before) but could I replace the server names to DNS here? what has been wrong?

Another question: Could I set up my favorite IP address by ping or I am bind to to the one given by ISP? An idiot neighbour came to this idea contacting isp to get static ip
ps: bad quality of screenshot, new to shutter
 
Last edited:


f33dm3bits

Gold Member
Gold Supporter
Credits
6,098
I asked my isp for static IP address and they provided me one with (compromised) folllowing info:
Ip: 4x.xx.10x.x
DG: 4x.xx.10x.x
DNS 1: xx.xxx.xxx.xx
DNS 2: xxx.xxx.xxx.xx
I have tried to edit netplan file manger from this one, which is almost blanked:

to this one, meanwhile minding the indentation on the text editor bcz of python:

and that throws this error, with View attachment 7569:

strange numbers given by my isp to setup (starting with some of country's code, have not seen this before) but could I replace the server names to DNS here? what has been wrong?

Another question: Could I set up my favorite IP address by ping or I am bind to to the one given by ISP? An idiot neighbour came to this idea contacting isp to get static ip
ps: bad quality of screenshot, new to shutter
dns1 and dns2 should be ip addresses since those are the ip addresses your system uses to lookup and resolve dns. Most ISP's give dynamic ip adresses, there are some the give you a static ip, and some that give you a static ip if you pay extra. Is this system at home or did you rent a vps where you are configuring ip and dns?
 

Resakra

Member
Credits
319
no it is not a virtual server
we at neighborhood asked for the static ip address, dynamic running here slowly cz of old installed router. so I bought extra router, mounted next to the old one. so technically I got the wifi off of the old router to get it work as a switch; connected with a cable to the new router.

Since yesterday update of ubuntu20 , ethernet has been disabled (not sure it is the reason ) and sudo ifconfig wlp2s0 up did not help, to get it back. So I am ran out off internet right now at home. I am not sure if I would be able to give a middle finger to what isp provided me and go for a casual solution of reaching an static ip, by ping or I am bind to what they asked me to set up. spent a lot of time on their shit
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,098
It sounds like you are running the system from your home? If that is the case your system is connecting to your LAN meaning it will have a private ip. To get to your system from outside you will have to configure port forwarding to your system. For example say you want to run a webserver on your system running Ubuntu in your house since LAN with have a local range the range could be for example 192.168.122.0/24, then you could assign a static ip within your local network. Some routers allow you to set a static ip based on mac address but you can do both, the static ip would be something like 192.168.122.11 as an example.

Then back to you running a webserver example, you would then have to go to port forwarding configuration in your router, then tell your router that everything coming into your router going to port 80(http) has to be forwarded to 192.168.122.11 on your LAN. After you apply that and go through your external ip(which you can find by going to ipchicken.com) by either using a the ip or the dns name associated with that ip you will end up on your router. Then your router will see that's coming through port 80 so I need to forward that to 192.168.122.11:80, and don't forget to open the appropriate port on your Ubuntu firewall in my example case would be port 80.

Also about dns server configuration, you can use any dns server that is publicly available, for example google dns, opendns but there are many more just do a search on public dns servers.
 
Last edited:

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
6,096
You've got to love it when @f33dm3bits "talks dirty" - I learn a lot in this place by watching Threads such as this.

BTW Resa, my "laugh" placed earlier was not at your dilemma, but the "raised finger" cracked me up - just so's you know :p

Friday evening here in Oz, so enjoy your Linux and

Avagudweegend

Wiz
 

Resakra

Member
Credits
319
Haha. I did not go through the post cz was busy at the time but yeah i agree ;):p
I run the internet now through mobile hotspot so basically no lan no wifi through isp . So i did not understand any of his shit either :D
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,098
Haha. I did not go through the post cz was busy at the time but yeah i agree ;):p
I run the internet now through mobile hotspot so basically no lan no wifi through isp . So i did not understand any of his shit either :D
If your Ubuntu is connected to the Internet through your mobile hotspot I would think you are going to run into problems since 4G is just for being able to access the internet and the data goes through the network of your mobile provider and I doubt that they will support port forwarding and I have never heard of a static ip for 4G since AFAIK those are all dynamic with a dhcp lease. So what exactly are you trying to do with your Ubuntu system, I am not understanding what you are trying to do? Do you just want your Ubuntu system to have an internet connection and be able to install software and use it just for you or do you want your Ubuntu system to have a server function as in being able to access it from the internet?
 
Last edited:


Staff online

Members online


Latest posts

Top