0

I have server with two NIC. One is for intranet (ens160) and second is for access to internet (ens192). I tried to set this configuration through netplan and tried several combinations, unfortunately I have a problem with incoming connection from intranet e.g. I am not able to connect by ssh to the server.

This is my netplan configuration

network:
  ethernets:
    ens160:
      addresses:
      - 10.133.30.61/24
      nameservers:
        addresses:
        - 10.133.24.222
        search: []
      routes:
      - to: 10.133.30.0/24
        via: 10.133.30.1
    ens192:
      dhcp4: true
  version: 2

Internet works, I can ping another servers in intranet, but as I said, I am not able to connect to this server.

ip route

ip addr

However if I change netplan configuration to this, ping/ssh works, but internet doesn't

network:
  ethernets:
    ens160:
      addresses:
      - 10.133.30.61/24
      nameservers:
        addresses:
        - 10.133.24.222
        search: []
      routes:
      - to: default
        via: 10.133.30.1
    ens192:
      dhcp4: true
  version: 2

Could someone help me, how to solve this problem?

rumcajs
  • 1
  • 1
  • 1. You shouldn't route traffic in the same subnet. 2. Do you have firewall enabled? If so, what firewall rules are active? – eKKiM Apr 25 '23 at 11:49
  • No, I don't have firewall. If I change `routes: -to: default` instead of `- to 10.133.30.0/24` I can ping server, but internet doesn't work. – rumcajs Apr 28 '23 at 07:36
  • You shouldn't need any route (not even the default) on ens160 (if your intranet is all on the same subnet). – eKKiM Apr 28 '23 at 07:38
  • @eKKiM I deleted routes from ens160, same problem. Internet/intranet works, but incoming traffic not :/ – rumcajs Apr 28 '23 at 07:40
  • Can you clarify where the incoming traffic is coming from? Did you only check SSH? Ping? ... and whats the IP of the host you are testing from? – eKKiM Apr 28 '23 at 07:44
  • I am idiot... I didn't realize that I am connected through VPN and I have another IP. Instead IP from range 10.133.30.0, PC on VPN has 192.168.0.0. Thank you for your reply, it helps me to find out problem :D – rumcajs Apr 28 '23 at 07:52

0 Answers0