I
I
Ivan SCM2016-09-13 09:25:58
Debian
Ivan SCM, 2016-09-13 09:25:58

2 white ips on one network card in Debian. How to destroy traffic?

There is iron with three physical network interface cards. One of them (sk1) has a string with two white ip and Internet from the same subnet and one gateway. You need to resolve the traffic as follows:
Network card 2: to which the router with Internet and wifi distribution will connect
Network card 3: to the machine with lxc, two of which need these white ips to serve files (externally refer to A domain records, inside Apache or NGINX)
It is necessary that the router be on the same subnet as the machine with lxc and that certain ports be opened for external access via white ip.
I understood the theory, I understood the scheme, but I don’t know how to steer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-09-13
@IvanSCM

If you need to combine meshes behind different network cards, use brctl - a virtual switch
. You also need to enable ip forwarding by adding net.ipv4.ip_forward = 1 to the /etc/sysctl.conf file. For example
, Configure SNAT to external ip, and forward the necessary ports using DNAT is all done with iptables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question