Possible to use two ethernet ports at once?

4 replies [Last post]
Offline
Joined: Aug 24 2005
Posts: 126

I have a dual NIC, and I was wondering if it is possible to use one of them connected directly to the internet for browsing, and the other going through my router for things like P2P and download managers... This is in OS X 10.4.9.

__________________

Mac Pro 2Ghz 2GB RAM X1900XT 320GB HD 160GB HD 40GB HD 10.4.7 Sceptre 20.1inch widescreen LCD | Pismo 400Mhz 256MB 10GB HD 10.4.1 | Power Mac G3 400Mhz 640MB RAM 18GB SCSI array Rage 128 10.4.7 | Athlon 64 3000+ 1GB RAM Geforce 6800GT 120GB HD 80GB HD XP

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Eudimorphodon's picture
Offline
Joined: Dec 21 2003
Posts: 1204
Why?

There's no way your internet connection is faster then one 1Gb ethernet port, unless you're very, very, *very* lucky.

If you insisted, here's the most brain-damaged way to do it. For instance, this is your "behind the router" interface:

en0: 192.168.0.69

"Internet" interface:

en1: 1.2.3.3

Your nat router is 192.168.0.1, your ISP gateway is 1.2.3.1. (I'm assuming you bought a block of static IPs from your ISP, of course, and the router's consuming one.) Set your routing table like so:

default 192.168.0.1
192.168.0.0/24 en0
(whatever the netmask of your ISP connection is) en1

Add firewall rules like so:

ipfw add 1000 fwd 1.2.3.1 tcp from any to any dst-port 80
ipfw add 1001 fwd 1.2.3.1 tcp from any to any dst-port 443

Now your http/https traffic is skipping the router and going to the internet directly, while everything else uses the default gateway, which of course is the internal address.

What this accomplishes I dunno, but there you go.

--Peace

Offline
Joined: Aug 24 2005
Posts: 126
OK well here is what I was ac

OK well here is what I was actually wanting to do with this... With my router I can change the MAC address, and when I do that my ISP assigns me a new IP. I use this to get around download limits on sites like rapidshare and megaupload. Could I make a firewall rule to set all traffic from say rapidshare.com to go through the router?

__________________

Mac Pro 2Ghz 2GB RAM X1900XT 320GB HD 160GB HD 40GB HD 10.4.7 Sceptre 20.1inch widescreen LCD | Pismo 400Mhz 256MB 10GB HD 10.4.1 | Power Mac G3 400Mhz 640MB RAM 18GB SCSI array Rage 128 10.4.7 | Athlon 64 3000+ 1GB RAM Geforce 6800GT 120GB HD 80GB HD XP

Eudimorphodon's picture
Offline
Joined: Dec 21 2003
Posts: 1204
Not that easily

The grungy ipfw-level tools limit choosing gateways for traffic to either service type (aka, port) or destination IP. Peer to peer involves essentially random IPs, and usually involves multiple (and semi-random) ports. So doing this with bittorrent-type programs is sort of out. If you're exchanging data with (downloading from) a single (or well defined manageable list) of IPs then you can do it. (Get the list of IPs, put them in an ipfw table, and use a command syntax similar to above except referencing the table as the destination address and leaving out the port numbers.)

You're probably better off doing your pirating on a separate computer. ;^)

--Peace

Offline
Joined: Aug 24 2005
Posts: 126
The Mac Pro uses so much powe

The Mac Pro uses so much power I can't afford to run another computer. Sad

Just kidding but it does use a lot of power.

__________________

Mac Pro 2Ghz 2GB RAM X1900XT 320GB HD 160GB HD 40GB HD 10.4.7 Sceptre 20.1inch widescreen LCD | Pismo 400Mhz 256MB 10GB HD 10.4.1 | Power Mac G3 400Mhz 640MB RAM 18GB SCSI array Rage 128 10.4.7 | Athlon 64 3000+ 1GB RAM Geforce 6800GT 120GB HD 80GB HD XP