4

I am working with an embedded system in my lab and to remotely access the board, I have given a static IP to the board on Ethernet connection. The problem is - due to security reasons Ethernet connection cannot access general internet. The only way to access internet is by using wlan0. By default, Ethernet connection is preferred over wireless.

Is there a method by which I can remotely access the board using Ethernet? and whenever I run a command which required general internet connection ( such as sudo apt-get update), the board uses wlan0 to access internet!

Hizqeel
  • 1,915
  • 28
  • 24
  • 24

1 Answers1

0

You can assign a different IP address to each network interface or have them assigned by the DHCP server on their respective network (the default if you don't assign an IP manually). You already assigned an IP address to the wired network interface and I would guess that the wireless network has a DHCP server, so you can just leave that at its default configuration.

You should now be able to

  • reach the host from both networks through their respective IP addresses (unless an intermediate network component like a firewall blocks such traffic) and

  • access the internet through the wireless interface, because the DHCP server should have submitted a gateway address, so the host's networking layer can set up an appropriate route to public internet.

  • The wired connection should have no internet access unless you set up a gateway and/or route for it.

If you want to restrict inbound SSH traffic to one interface you can configure the SSH server to only listen to connections coming through that interface:

  1. In /etc/ssh/sshd_config uncomment or add a ListenAddress entry with the static IP address of that interface, e. g.:

    ListenAddress 10.0.23.42
    

    You can specify ListenAddress if you want to listen to multiple interfaces or IP versions (e. g. in a dual-stack setup with IPv4 and IPv6 on the same interface).

  2. Restart the SSH server:

    sudo service ssh restart
    
David Foerster
  • 36,890
  • 56
  • 97
  • 151