<p>I have two network interfaces on a node. One is internal network and the other is external network. Internal network is <code>192.168.50.0/255.255.255.0</code>(internal network).
And external network is <code>192.168.0.0/255.255.255.0</code>. Kubernetes consists of <code>192.168.50.0/255.255.255.0</code>. I want to approach internal network from another local nodes without using internal network interface. How can I solve this problem?</p>

K.k
<p>Without subnet masks , I do not understand how they are different networks. </p>

<p>But , in any case , you need to enable routing packets from one interface to another. I assume you are on Linux node , there you may enable ip-forwarding.</p>

<pre><code>echo 1 &gt;&gt; /proc/sys/net/ipv4/ip_forward
</code></pre>

<p>Then set up some rules in iptables to perform the natting and forwarding:</p>

<p><strong>Example rules:</strong></p>

<pre><code># Always accept loopback traffic
iptables -A INPUT -i lo -j ACCEPT

# We allow traffic from the LAN side
iptables -A INPUT -i eth0 -j ACCEPT

######################################################################
#
#                         ROUTING
#
######################################################################

# eth0 is LAN
# eth1 is WAN

# Allow established connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Masquerade.
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# fowarding
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# Allow outgoing connections from the LAN side.
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
</code></pre>

<p><a href="https://serverfault.com/questions/453254/routing-between-two-networks-on-linux">https://serverfault.com/questions/453254/routing-between-two-networks-on-linux</a></p>
