Home / ComXchange / ComXchange Tips / Networking - Using a Single Network Interface

Networking - Using a Single Network Interface


Note: If you are going to change the IP address of the interface start with the intructions in the below article.  Typically is is best to disable OpenVPN when you are changing the LAN network as the bridge interface can cause unexpected issues.    
https://kb.clearlyip.com/comxchange/Networking---Changing---IP---Address.html

Using OpenVPN: (Not using OpenVPN start below)

SSH to the controller (192.168.101.2) and do the following:

vim /etc/sysconfig/iptables

paste the following lines, substituting ens160 for the interface name if needed:

-A INPUT -i eth0 -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -i br0 -p udp -m udp --dport 1194 -j ACCEPT

:wq! to save your changes and quit

Next, run:

service iptables restart

Next, run:

cd /etc/openvpn && vim openvpn-startup

Add the following line at the bottom of the file:

route add default gw 192.168.101.1 (or other router/gateway address)

wq! to save your changes

Continue below

NOT using OpenVPN, start here!

Next, run (you may need to substitute ens160 in the interface file name):Edit

cd /etc/sysconfig/network-scripts && vim ifcfg-eth0

change GATEWAY= to 192.168.101.1 (or other router/gateway address)

change DEFROUTE= to yes

:wq! To save your changes

Next, run (you may need to substitute ens192 in the interface file name):

cd /etc/sysconfig/network-scripts && vim ifcfg-eth1

change DEFROUTE= to no

:wq! To save your changes

Next, disable the WAN interface in the GUI:

ifdown eth1

This will shut down the WAN interface.

Then, disable the WAN interface: Under Admin>System Settings>Network Interfaces, change Start on Boot to No


This last command is ONLY needed if using OpenVPN

NOTE: Running the following will terminate the current VPN connection (you will need to reconnect)

run:

systemctl restart openvpn@server.service




     RSS of this page