IP Forwarding

Issues related to configuring your network
Post Reply
manishp
Posts: 14
Joined: 2023/03/22 14:14:47

IP Forwarding

Post by manishp » 2023/03/30 16:19:54

Hi,

I have configured IP Forwarding in Centos Stream 9 and now I want to use say any OS machine so that it can surf internet by using CentOS Stream 9 IP !
IS it possible or need to configure Proxy Server or likewise ?

Please guide!

BShT
Posts: 585
Joined: 2019/10/09 12:31:40

Re: IP Forwarding

Post by BShT » 2023/03/30 19:35:41

you don´t need a proxy unless you want to make some filter based on URL names

manishp
Posts: 14
Joined: 2023/03/22 14:14:47

Re: IP Forwarding

Post by manishp » 2023/03/31 06:41:24

Thanks!
So how to configure any system so that it uses CentOS for Internet, internet packets should pass from CentOS system ?
Shall I need to configure of CentOS IP in NIC or in Browser ! Please advise!

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: IP Forwarding

Post by jlehtone » 2023/03/31 08:05:07

A typical (and relatively simple) setup is that you have a router between outside, "WAN", and your home subnet, "LAN".
The router is member of two subnets, so it has two network interfaces.

Earlier one could have set up FirewallD with the WAN in "external" zone and the LAN in "trusted" zone.
That did enable IP forwarding and the external zone did sNAT too (with "masquerade").
One wants to masquerade traffic that comes from LAN to WAN -- only the router's WAN IP address is seen as source in the packets that go out.

However, the current FirewallD has "policy objects" to control inter-zone traffic. The "external" zone on WAN port is still ok,
the LAN port should be stricter than "trusted", and the policy ... I really do not know the correct incantation.


The other part has "nothing" to do with the router. Every member of the LAN (except the router) has to have in their routing table rule to use the router's IP address as the gateway to outside of LAN.

In the typical home setup one has that modem/router/WiFi-box that runs DHCP server for the LAN and the DHCP gives every LAN member IP address, DNS server's address, and the router's LAN IP address as the "default route".

It is possible to run DHCP server on CentOS Stream. The package dnsmasq provides service that is relatively easy to configure.

Post Reply