NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Correct way to route openvpn to connect only via eth0

Hello,

I have a cRIO-9068 running LabVIEW 2014.  I have an Internet connection available on both eth0 and eth1.  I would like to ensure that openvpn only connects via eth0.  That is, if I un-plug eth0 and still have eth1 plugged in, the connection will not be made.

I suspect this is done with the route command, however I haven't seemed to get it right yet.  Also, where should I be placing the command to ensure it persists between reboots?

I started by modifying my /etc/network/interfaces to look like this:

auto eth0

iface eth0 inet dhcp

  post-up route add -host <server_ip_address> eth0

auto eth1

iface eth1 inet dhcp

That did not work, and I had to go into safe mode to recover.

Could someone assist in shedding some light on how I should be going about this?

Thanks,

-TD

0 Kudos
Message 1 of 4
(3,665 Views)

Just a quick note: NI Linux RT does not use the /etc/network/interfaces file for network interface configuration.

I would recommend checking the OpenVNC configuration file to see if there's a method to describe the interface that you'd like to use for incoming connections. Failing that, simply blocking the traffic to the UDP port on ETH1 is a reasonable option.

0 Kudos
Message 2 of 4
(3,116 Views)

Thanks Brad.

Yikes, that's kind of scary that I can make the device non-responsive by modifying /etc/networking/interfaces then ... I'll back those changes out.

I'll look into the OpenVPN configuration more.  As well as blocking the traffic on eth1.

Thanks for the sugestions.

-TD

0 Kudos
Message 3 of 4
(3,116 Views)

There have been other folks who've played with /etc/network/interfaces, but I've not seen it cause the networking to go down altogether... could be some interaction with OpenVPN. Basically, if it tries to do something with the entries as listed in that file, it would be inconflict with the ifplugd stuff that normally handles network configuration

0 Kudos
Message 4 of 4
(3,116 Views)