Possible to use two ethernet ports at once?

5 posts / 0 new
Last post
Offline
Last seen: 8 years 4 months ago
Joined: Aug 23 2005 - 20:36
Possible to use two ethernet ports at once?

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.

Eudimorphodon's picture
Offline
Last seen: 2 weeks 2 days ago
Joined: Dec 21 2003 - 14:14
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
Last seen: 8 years 4 months ago
Joined: Aug 23 2005 - 20:36
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?

Eudimorphodon's picture
Offline
Last seen: 2 weeks 2 days ago
Joined: Dec 21 2003 - 14:14
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
Last seen: 8 years 4 months ago
Joined: Aug 23 2005 - 20:36
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.

Log in or register to post comments