The bridge configuration will merge two (or several) networks into one single network topology. IpTables firewall rules can be used to filter traffic.
A router configuration can support multicast and basic IP routing using the "route" command. IP masquerading (NAT) can be used to connect private local area networks (LAN) to the internet or load balance servers.
- Turn on IP forwarding to allow Linux computer to act as a gateway or router.
echo 1 > /proc/sys/net/ipv4/ip_forward
Default is 0. One can add firewall rules by using ipchains.Another method is to alter the Linux kernel config file: /etc/sysctl.conf Set the following value:
-
net.ipv4.ip_forward = 1
See file /etc/sysconfig/network for storing this configuration.
-
FORWARD_IPV4=true
-
All methods will result in a proc file value of "1". Test: cat /proc/sys/net/ipv4/ip_forward
The TCP Man page - Linux Programmer's Manual and /usr/src/linux/Documentation/proc.txt (Kernel 2.2 RH 7.0-) cover /proc/sys/net/ipv4/* file descriptions.
0 comments:
Post a Comment