Thursday 27 December 2018

mac - Usage of Dual Ethernet Jacks (One for LAN, One for WAN)


I'm working on an old Mac PowerPC G5 that has two Ethernet jacks. I'm interested in finding a way to have both jacks setup so that all internal traffic (all traffic to and from a specific IP address range. E.g., 192.168.*) to be routed through one of the jacks, and the other jack to route all other traffic.


It sounds doable, but I'm not sure how to approach this situation. Any help would be much appreciated.


EDIT


Thank you for the quick responses. I'm sorry for not being clear, I'm using OS X Tiger and I am not trying to share my internet connection.


My router provides two connections to my Mac (i.e., providing two internal IP address to my computer, e.g., jack #1 192.168.1.100 & jack #2 192.168.1.101)


Let's say I want to connect to a VPN on jack #2, but keep access to local resources on jack #1. (i.e, jack #1 192.168.1.100 & jack #2 VPN assigned 10.246.10.100)


In this example, I would want all internal traffic (to and from 192.168.*) to be routed through jack #1 and all other traffic routed through jack #2.


I hope this clears up my situation more.



Answer



This can definitely be done using the route command. I wish I could offer exact advice on how to use it but I haven't used it in 14 years. it should be something like this


Set the default route to the first ethernet (assuming eth0) using the GUI, then:


route add -net 192.168.0.0 netmask 255.255.0.0 dev eth1

This assumes that eth1 is where the vpn traffic will go (I think)


To view the routes that you have set up use netstat -rn


This can get quite complicated very quickly. You might get a better answer if you ask at serverfault.com on how to use the route command.


If you really want to learn how to do this, it would be covered in TCP/IP Illustrated, Volume 1: The Protocols which is an excellent, very technical book.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...