Hello.
Please help me understand the Packet Flow.
We have:
Mikrotik Router with 2 network interfaces such as Ethernet, which are called LAN and Management
PPPoE connection to your ISP for Internet access. PPPoE server is located at the ISP, PPPoE connection is made through the Management interface:
ISP <-> | Modem in Bridge-mode | <-> | Management Interface -= Mikrotik =- LAN Interface | <-> LAN Network
Internet <-> PPPoE on Mikrotik through Management Interface
LAN interface is assigned a private IP address, called the LAN_ROUTER_IP
Management interface is assigned a private IP address, called the MANAGEMENT_ROUTER_IP
Using PPPoE Router gets a WAN IP address, name it WAN_ROUTER_IP
To access the Internet from the LAN is configured Src-NAT: add action = src-nat chain = srcnat comment = "" out-interface = PPPoE to-addresses = WAN_ROUTER_IP
A host from the LAN connects to some host on the Internet using HTTP protocol on port 80 on that host. The host of the LAN network called LAN_HOST_IP. Host on the Internet called WAN_HOST_IP.
Packet flow from LAN to Internet will be:
1. Packet from LAN_HOST_IP comes to the LAN interface of the router:
LAN_HOST_IP: 47850 -> WAN_HOST_IP: 80
Further works:
a) Prerouting: DO nothing
b) Forwarding: YES, the packet must be routed to the PPPoE interface of the router
c) Postrouting: DO SRC-NAT, change source IP to WAN_ROUTER_IP
2. Packet go to the PPPoE interface:
WAN_ROUTER_IP: 47850 -> WAN_HOST_IP: 80
Further works:
a) Prerouting: DO nothing
b) Forwarding: DO nothing
c) Postrouting: DO nothing
3. Packet leaves the PPPoE interface of the router
Packet flow from Internet to LAN, the host WAN_HOST_IP response
1. Packet from WAN_HOST_IP comes on PPPoE interface of the router:
WAN_HOST_IP: 80 -> WAN_ROUTER_IP: 47,850
Further works:
a) Prerouting: DO DST-NAT, change Destination IP to LAN_HOST_IP
b) Forwarding: YES, the packet must be routed to the LAN router interface
c) Postrouting: DO nothing
2. Packet go to LAN interface:
WAN_HOST_IP: 80 -> LAN_HOST_IP: 47,850
Further works:
a) Prerouting: DO nothing
b) Forwarding: DO nothing
c) Postrouting: DO nothing
3. Packet leaves the LAN interface of the router.
This is correct?