D
D
DragoSFire2015-11-26 18:23:15
linux
DragoSFire, 2015-11-26 18:23:15

How to make the web server access a different network interface?

Hello. The server has two network cards, with two different IP addresses and with access to the network. Accordingly, two interfaces: eth0 and eth1. There was a need to move one site from eth0 to eth1 so that it does not interfere with other services running on eth0. Sites are running on nginx. How can these actions be implemented?
I tried dumping interfaces with tcpdump. Specially launched this site on a separate port.
tcpdump -i eth1 port 82 - when accessing data goes, everything works, however ...
tcpdump -i eth0 port 82 - the same as with the first interface.
Shouldn't there be an appeal only to a specific source?

lspci | grep Eth
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 06)
0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

ifconfig
eth0      Link encap:Ethernet  HWaddr 90:2b:34:59:xx:xx  
          inet addr:83.69.139.xxx  Bcast:83.69.139.255  Mask:255.255.255.128
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:50599 errors:0 dropped:6547 overruns:0 frame:0
          TX packets:65316110 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3383987 (3.2 MiB)  TX bytes:50516577893 (47.0 GiB)

eth1      Link encap:Ethernet  HWaddr 90:2b:34:59:xx:cc  
          inet addr:83.69.139.xxx  Bcast:83.69.139.255  Mask:255.255.255.128
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34286328 errors:0 dropped:4 overruns:0 frame:0
          TX packets:776 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3543689385 (3.3 GiB)  TX bytes:49832 (48.6 KiB)
          Interrupt:20 Memory:fb700000-fb720000

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2015-11-26
@dimonchik2013

listen
well, before that ipconfig
because bald is IP , not interface

V
Victor Taran, 2015-11-27
@shambler81

kapets, guys, is it not fate to simply breed these sites in a virtual host or in a nigtx conf?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question