# Problem with configuration of 2Ã¢Â€Â™nd DSL link on FreeBSD 7.2 (gateway problem?)



## fanz (Aug 12, 2009)

*Problem with configuration of 2â€™nd DSL link on FreeBSD 7.2 (gateway problem?)*

Hi

Iâ€™m currently using FreeBSD 7.2-Release as my router.
I've got a PC with 2x DSL (from different providers) and 1 LAN. At this moment I've got one DSL link up and working.
The question is: how to set up 2'nd DSL connection (eg. ip/gate)? 
At this moment Iâ€™m not thinking of advanced load balancing, but only to use 1â€™st DSL link as NAT and 2â€™nd DSL link for one dedicated service (eg. ftp).
Iâ€™ve got defaultgateway set in rc.conf to gate from 1'st DSL link, so the 2â€™nd DSL link is not reachable from WAN even if i properly set-up ip/mask for 2â€™nd NIC in rc.conf.
Any hints? What is the simplest way to reach this? Is pf necessary for this configuration?

Thank you in advance!
Fanz


----------



## esogs (Aug 13, 2009)

If your second DSL was the block 10.20.30.0, your ISP's gateway was 10.20.30.1, and you had been given 10.20.30.5 as your IP on the DSL you could first add a route for it:

% route add -host 10.20.30.5 10.20.30.1

Then, as you say, because you are specifically trying to route anything for port 21/22 over this DSL, I think I would use pf (or ipfilter) to map anything coming over either of your two dsl interfaces on those ports to that 10.20.30.5 address.

Even if you tied those two DSL links together, you'd have to likely use IPF or IPFILTER to do specific port remapping over the one specific interface.


----------

