Score:0

Ubuntu server can be accessed only after ping

vn flag

and tank you in andvantage for any suggestion, I hve ubuntu server (20.04) on lan, but I can access to it (ssh or web-server apache) from other pc (windows 10) only if I do a ping from server to client (ubuntu must ping windows).

I read this post, and I tried suggested solutions:

  • tried changing ip
  • tiend to clear ARP cache on router
  • tried to add static ip with /24 netmask.

My netplan configuration is the following:

# This is the network config written by 'subiquity'
network:
  version: 2
  wifis:
    wlp1s0:
      access-points:
        MYNETWORK-ID:
          password: MY-PASSWORK
      dhcp4: true

I tried also to set a static ip from router, but also in this case I must ping from server to client before having ssh access to it.

Why this? and.. how to fix it?

note: i installed wpasupplicant.

note: i have to netplan files in my distro:

  1. 00-installer-config-wifi.yaml
  2. 00-installer-config.yaml (for ethernet) I leaved both of them also if I changed only first.

wifi perfectly works every reboot (after ping).

EDIT:

I tried, as suggested by Zarh Kasparian, to add MAC adress to netplan config file:

# This is the network config written by 'subiquity'
network:
  version: 2
  wifis:
    wlp1s0:
      access-points:
        MYNETWORK-ID:
          password: MYPASSWORD
      addresses:
        - 192.168.1.110/24
      macaddress: 80:a5:89:ad:85:0f
      dhcp4: true
      gateway4: 192.168.1.1
      nameservers:
          addresses: [8.8.8.8, 1.1.1.1]

Problem still not fixed.. any help?

Zareh Kasparian avatar
us flag
Your ping request makes your network device, learn your system MAC address. this MAC address could be statically added to your network device.
petunia rose avatar
vn flag
Sorry, I don't understand very clear. You say: my ping request (from server) makes learn my MAC adress (server adress?? who learn, server or client??). then you say: this MAC adress (server?) could be statically added to my network device (you mean to add MAC adress of server in netstat file? or how to do that?) tank you. note: i just added to router static ip of server (with relative MAC adress). NOTE:I already tried to add static ip to router (with server MAC adress).. if you mean that, it does not fixs problem.
Zareh Kasparian avatar
us flag
Yes. you understood correctly. I'm not aware of your network, but for sure there is a router/switch or anything else, which your server GW is defined on that. Thus you need to add your server's mac address added to that device. routes are actually working as Layer 3. if you MAc address is not learned via Layer2, then there would be no connectivity as L2 to your GW @petunia rose
petunia rose avatar
vn flag
I tried, but I didn't have success.. any suggestion? (edited post with new configuration)
Zareh Kasparian avatar
us flag
This is wrong. please let me know what is your gateway? a Modem,A router or are you connected to a switch? you should have added the Server mac address which is "80:a5:89:ad:85:0f" to your device which is acting as your Gateway. if there is a swicth in between add the mac to teh swicth. if you are connecting to a modem, the add the mentioned mac as static mac to your device configuartion(where 192.168.1.1 is)
petunia rose avatar
vn flag
First of all (as my first setting) I had the first netplan configuration (in the post) with static ip registered in my modem (hub). I had that static ip coupled with the server mac (80:a5:89:ad:85:0f), as said in the question, but it didn't help to fix the problem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.