Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently asked this question: How to set Mac server to use different Gateway for internet bound traffic

The answer given works but has presented me with another issue that I didnt make clear in that question.

Here is my network layout as it stands:

At the moment outside staff members use some services on the existing internet 1 link. Those services are hosted by the Mac server. If I change the gateway of the Mac server to the second modem those outside staff lose visabilty on those services.

Now I dont know how to go about solving this issue. I want the second link to be used when the Mac server goes to rsync data offsite but everything else use link one. How do I do this?

Thanks

Scott

EDIT: This has been resolved by setting the default gateway on the Mac server to 192.168.1.254 Thus leaving everything on the network as it was before. but to get the Mac server to use the other link for rsync I've added a route to the Mac server to route traffic to the rsync server through the second gateway.

sudo route add -net {server IP's}/{Netmask} 192.168.1.1

I've awarded the answer to gravyface for pointing me to a post on how to make this route persistant in Mac

share|improve this question
    
I'm assuming that both modems are actually routers as well? Or are there router(s)/firewall(s) behind them? –  gravyface Dec 17 '10 at 15:54
    
Yes sorry, both modems are routers/switch/firewall –  Brady Dec 17 '10 at 15:56
add comment

3 Answers 3

up vote 1 down vote accepted

Instead of setting a rule on your Mac Server, set a static Route on your Main-Router (.254) to send packets for specific IP-Adresses to your Router No. 2 (.1)

share|improve this answer
    
Thanks for this late entry. I dont know why I didnt think to put in the route on the main router to forward any traffic for the offsite IPs to the second gateway. Doing this also solves my other issue of static routes not sticking on my Mac server. The main router remembers its static route. –  Brady Jan 17 '11 at 11:31
add comment

It might be simpler and easier to manage if you use a router that supports multiple WAN connections. You can then force certain types of traffic and/or specific sources and destinations to use the internet connection.

We also have two internet connections and use a Sonicwall NSA240, and it works perfectly. All the clients point to a single gateway address.

share|improve this answer
    
No sorry this is not simpler and easier solution. The two internet lines are by different providers and are different technologies. The existing line is firewalled and setup fine as it is and doesnt want to be tampered with. The second line was introduced as it has 4* the outbound capacity as the first. The second line has no SLA uptime agreement and is simply there to push data off site. –  Brady Dec 17 '10 at 15:55
2  
I think you miss the point - you'd connect each modem to the Sonicwall and then the inside connection of the sonicwall to your switch. Let the sonicwall handle the decisions about which WAN connection to use, and set all your internal equipment to use the Sonicwall as the gateway. Of course you could do this through your Mac server with two network cards, but I expect that is doing a whole bunch of stuff as well, so get something dedicated to do the WAN balancing without disrupting your server. –  dunxd Dec 17 '10 at 16:12
    
No I didnt miss the point. Firstly I dont have a sonic wall. And although my diagrams are showing as modems they are actually modems/switches/routers/firewalls all in ones provided by the ISP's. The second line thats been put in is only used by the server and nothing else on the network. The network is configured and firewalled to use the first line since day one. Dont need a dedicated piece of kit and more expense. Just want the server that I have to push data out on a second line. –  Brady Dec 17 '10 at 16:20
    
Alas, I was hoping this would be the right answer... –  gravyface Dec 17 '10 at 17:28
add comment

I've changed my mind about deleting this even though I feel that you're missing out on an opportunity to do the right thing because you don't want to shell out a couple hundred bucks on a decent firewall.

Anyways, you don't need the second NIC, I re-read it (and coffee helped), and you just need to create a route on the Mac Server such as described in this SF answer*, whereas the destination would either be the IP address of the rsync host or the subnet, depending on who/what this rsync host is (i.e. a backup service provider or a VPS box you own with one static IP).

*This would likely work on your Mac Server, but there may be a different/better method of making it permanent, I don't know, never touched a Mac server.

share|improve this answer
    
The server doesnt have 2 network ports. Is it not possible to assign a second IP to one network port? –  Brady Dec 17 '10 at 16:13
    
Sorry I tell a lie the server does have a second network prot. Im in progress of setting it up –  Brady Dec 17 '10 at 16:53
    
Yeah, don't bother. Seriously, you don't need to change that or modem #2. –  gravyface Dec 17 '10 at 16:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.