0

I think my question is very simple. Assume that I have a router or a computer with turned on routing. The device has 2 interfaces and see two networks. For example, 192.168.0.2 eth0 and 10.0.0.2 eth1. Locally I have nginx on 192.168.0.2:80. I undestand that if eth1 receives packet with destination 192.168.0.3 it will be forwarded to eth0. But what if 192.168.0.2:80? Will it be forwarded to nginx? Or will it be dropped? What rules will kernel use to handle this situation?

2

1 Answer 1

0

Eth1 can't receive 192.168.0.2:80 only if it is a gateway or a hop for the one which sends the package. In that case if you have IP forwarding enabled in kernel and masquerading for the interface you will be able to let traffic pass through interface eth1 and finally reach 192.168.0.2:80, your destination.

1
  • Thanks for response! I've read more about host model. As far as I understand you do not need masquerading if model is weak. So in my case (weak model) kernel should accept packet with local dst 192.168.0.2 on interface 10.0.0.2.
    – airled
    Jan 6, 2019 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .