1

I want to connect my home ubuntu server with ssh from remote. So i bought static ip address from my provider. But i don't know how to set up it correctly.

I have done something like that in /etc/netplan/50-cloud-init.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s5:
     dhcp4: no
     addresses: [<my_ip>/24]
     gateway4: <my_ip>
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

And after

sudo netplan apply

But it haven't work for me. (Sorry if it is a dumb question)

Mark
  • 11
  • 2
  • 1
    See https://www.techrepublic.com/article/how-to-configure-a-static-ip-address-in-ubuntu-server-18-04/ if you are using 18.04. – K7AAY Oct 07 '19 at 20:03
  • @K7AAy, thank you, but it doesn't works for me. Which ip i should use WAN or LAN? – Mark Oct 07 '19 at 20:28
  • 2
    Look up *port forwarding*. The static IP address that you are renting tells the word where your **router** is, not where your Ubuntu system is. Login toyour router and you will see that IT has the static IP address. You must tell your router to *forward* inbound ssh connections to your Ubuntu system. There are free alternatives to renting an IP address, too. – user535733 Oct 07 '19 at 23:44
  • Thank you guys, now i have my own server))) – Mark Oct 08 '19 at 18:45

0 Answers0