On 11/8/22 09:09, Michael D. Setzer II via users wrote:
Probable a simple solution, but its been a while since I done this type of stuff.
Have a cable modem that has 4 ports but using 2.
First port gets public IP xxx.xxx.233.11 with private network 192.168.16.x
Second port gets public IP xxx.xxx.234.251 with private network 192.168.24.x
ip route
default via 192.168.16.1 dev enp8s0 proto dhcp metric 100
default via 192.168.24.1 dev wlp7s0 proto dhcp metric 600
192.168.16.0/24 dev enp8s0 proto kernel scope link src 192.168.16.101 metric 100
192.168.24.0/24 dev wlp7s0 proto kernel scope link src 192.168.24.13 metric 600
Years ago, had setup a Redhat 9 machine that had 9 ethernet interfaces.
1 connected to college backbone, and 8 that connect to 8 separate classrooms with each having its
own private network. Used IPtables and had it all able to communicate with any machine in any
classroom, and all machines used a squid server running on same machine getting a 40% cache hit
ratio. So know it can be done.
In searching found pages that say shouldn't have two default routes, but that it what it shows on
systems connect to both networks by default. Many things work, but others don't.
Some things mentioned
echo 1 >> /proc/sys/net/ipv4/ip_forward
Which I recall needing before, but didn't seem to solve issue?
Ping works between networks, but traceroute doesn't.
Wondering if there is a simple solution.
I seem to recall that the default route is determined by which default
was defined most recently. That would be the first one listed by "ip
route".
I have a multi-homed router with only one default route. Each other
port has a 10.something.1 address. Route to an interface's gateway can
be specified in the network scripts or manually added with:
"ip route add a.b.c.0/24 via a.b.c.1 dev ethX" (assuming GW is .1)
I use iptables FORWARD rules to decide which services are available
to/from which interfaces and ports.
You can also enable forwarding in /etc/sysctl.conf
"net.ipv4.ip_forward=1" and/or "net.ipv6.ip_forward=1"
To reload sysctl.conf issue "sysctl -p" and it will display changes in
sysctl.conf since last time (re)loaded.
Hope that's helpful,
Mike Wright
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue