Re: Gateway load balance

2009-06-18 Thread Wojciech Puchar

I've not yet had the luck with assigning more than one default gateway
in BSD,


simply use ipfw.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Raul I. Becette

Gary Gatten escribió:

PS: kudos for actually reading all that stuff!
  

A lot of time free in my former user support job...

- Original Message -
From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: FreeBSD Users freebsd-questions@freebsd.org
Sent: Wed Jun 17 12:18:07 2009
Subject: Gateway load balance

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux (Slackware).


My post is regarding something I couldn't find information on how to 
implement it. Here's the situation:


I had a proxy server (Squid + Dansguardian) under Slackware on the LAN 
which, via 'ip route' I make it use 3 gateways connected each one to an 
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a 
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working 
fine. My problem is that I don't know how to make the server use the 
other 2 gateways I have left and balance the requests on all ADSL lines.


192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC 
to ADSL modem)

192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but 
I am quite lost about how to do it.


Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

  



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Raul I. Becette

Gary Gatten escribió:

Adding 2 more default routes with same weight to each dsl line won't work?
  

I have another problem which I realized just now.
I configured via rc.conf the ip and netmask below but when I do ifconfig 
the netmask appears as /24


calamardo# cat /etc/rc.conf | grep ifconfig
ifconfig_nfe0=192.168.10.9 255.255.0.0
calamardo# ifconfig nfe0
nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
   options=8VLAN_MTU
   ether 00:1d:60:7e:38:7e
   inet 192.168.10.9 netmask 0xff00 broadcast 255.255.0.0
   media: Ethernet autoselect (100baseTX full-duplex)
   status: active

This makes impossible to use 192.168.30.100 and 192.168.30.1 since they 
are on different networks and are unreachable (according to ifconfig).



- Original Message -

From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: FreeBSD Users freebsd-questions@freebsd.org
Sent: Wed Jun 17 12:18:07 2009
Subject: Gateway load balance

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux (Slackware).


My post is regarding something I couldn't find information on how to 
implement it. Here's the situation:


I had a proxy server (Squid + Dansguardian) under Slackware on the LAN 
which, via 'ip route' I make it use 3 gateways connected each one to an 
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a 
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working 
fine. My problem is that I don't know how to make the server use the 
other 2 gateways I have left and balance the requests on all ADSL lines.


192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC 
to ADSL modem)

192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but 
I am quite lost about how to do it.


Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

  



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Raul I. Becette

Wojciech Puchar escribio':


I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux 
(Slackware).


very rare case today - someone that read books FIRST :)))

We always said that when everything fails, go to the books =o)
Like I said previously... a lot of idle time in my former job.






I had a proxy server (Squid + Dansguardian) under Slackware on the 
LAN which, via 'ip route' I make it use 3 gateways connected each one 
to an ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install 
a new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are 
working fine. My problem is that I don't know how to make the server 
use the other 2 gateways I have left and balance the requests on all 
ADSL lines.



use ipfw and fwd command.
for example with output section

add 1 fwd gw1_IP from DSL1_subnet to any via gw1_ethernet
add 10001 fwd gw2_IP from DSL2_subnet to any via gw2_ethernet
add 10002 fwd gw3_IP from DSL3_subnet to any via gw3_ethernet

please do treat above as an example of course.

Of course... more reading to do about ipfw


Of course use right squid commands so it will select right source IP 
based on the rules you want, but as you already did id under linux i 
assume you have this practiced already.
Last configurarion was a transparent proxy with request coming from the 
firewall LAN interface (actual LAN gateway). It is working that way now 
and I intend to take it away and make the proxy the default gateway of 
the LAN and do the balance..


i had 5+2 Polish Telecom links connected to one server - worked fine.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Raul I. Becette

Nikos Vassiliadis escribió:

Raul I. Becette wrote:

ifconfig_nfe0=192.168.10.9 255.255.0.0


If I recall correctly the correct syntax would be:
ifconfig_nfe0=192.168.10.9 netmask 255.255.0.0
or (the syntax I prefer)
ifconfig_nfe0=192.168.10.9/16




Yes. that was the problem. Forgot the netmask part
I forgot the basics of ifconfig command... =o)

Thanks

Raúl
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Nikos Vassiliadis

Raul I. Becette wrote:

ifconfig_nfe0=192.168.10.9 255.255.0.0


If I recall correctly the correct syntax would be:
ifconfig_nfe0=192.168.10.9 netmask 255.255.0.0
or (the syntax I prefer)
ifconfig_nfe0=192.168.10.9/16

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Gelsema, P (Patrick)
On Thu, June 18, 2009 15:16, Raul I. Becette wrote:
 Gary Gatten escribió:
 Adding 2 more default routes with same weight to each dsl line won't
 work?

 I have another problem which I realized just now.
 I configured via rc.conf the ip and netmask below but when I do ifconfig
 the netmask appears as /24

 calamardo# cat /etc/rc.conf | grep ifconfig
 ifconfig_nfe0=192.168.10.9 255.255.0.0

If I am not mistaken, it should be
ifconfig_nfe0=192.168.10.9 netmask 255.255.0.0 or
ifconfig_nfe0=192.168.10.9/16

see #man rc.conf

 calamardo# ifconfig nfe0
 nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
 options=8VLAN_MTU
 ether 00:1d:60:7e:38:7e
 inet 192.168.10.9 netmask 0xff00 broadcast 255.255.0.0
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active

 This makes impossible to use 192.168.30.100 and 192.168.30.1 since they
 are on different networks and are unreachable (according to ifconfig).


 - Original Message -
 From: owner-freebsd-questi...@freebsd.org
 owner-freebsd-questi...@freebsd.org
 To: FreeBSD Users freebsd-questions@freebsd.org
 Sent: Wed Jun 17 12:18:07 2009
 Subject: Gateway load balance

 Hi all

 First time posting.

 I am a long time Linux user (desktop and server) and started with
 FreeBSD a year ago.
 Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about
 the OS and how to configure different services I used in Linux
 (Slackware).

 My post is regarding something I couldn't find information on how to
 implement it. Here's the situation:

 I had a proxy server (Squid + Dansguardian) under Slackware on the LAN
 which, via 'ip route' I make it use 3 gateways connected each one to an
 ADSL line and balance the requests.
 Unfortunately my server crashed and I took the oportunity to install a
 new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working
 fine. My problem is that I don't know how to make the server use the
 other 2 gateways I have left and balance the requests on all ADSL lines.

 192.168.10.9/16  proxy
 192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC
 to ADSL modem)
 192.168.30.100/16 2nd gateway
 192.168.30.1/16  3rd gateway

 I found it could be done with PF (also read most of The Book of PF) but
 I am quite lost about how to do it.

 Any information would be greatly appreciated.

 Thanks in advance

 Raúl I. Becette
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org





 font size=1
 div style='border:none;border-bottom:double windowtext
 2.25pt;padding:0in 0in 1.0pt 0in'
 /div
 This email is intended to be reviewed by only the intended recipient
  and may contain information that is privileged and/or confidential.
  If you are not the intended recipient, you are hereby notified that
  any review, use, dissemination, disclosure or copying of this email
  and its attachments, if any, is strictly prohibited.  If you have
  received this email in error, please immediately notify the sender by
  return email and delete this email from your system.
 /font


 

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Raul I. Becette


I had a proxy server (Squid + Dansguardian) under Slackware on the 
LAN which, via 'ip route' I make it use 3 gateways connected each one 
to an ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install 
a new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are 
working fine. My problem is that I don't know how to make the server 
use the other 2 gateways I have left and balance the requests on all 
ADSL lines.



use ipfw and fwd command.

for example with output section

add 1 fwd gw1_IP from DSL1_subnet to any via gw1_ethernet
add 10001 fwd gw2_IP from DSL2_subnet to any via gw2_ethernet
add 10002 fwd gw3_IP from DSL3_subnet to any via gw3_ethernet


for my scenario I asume gwX_IP the IP address of my dsl gateways. What 
would be DSLX_subnet and gwX_ethernet?
The proxy has only 1 NIC. Just to be sure: gateway_enable=YES must be 
set in /rtc.rc.conf and the kernel must be recompiled with ip forwarding 
capabilities?





please do treat above as an example of course.

Of course use right squid commands so it will select right source IP 
based on the rules you want, but as you already did id under linux i 
assume you have this practiced already.


Under Linux I didn't used squid commands to do the balancing. Only 
defining the 3 gateways with ip route command.

Is it possible to do the same with ipfw as you mentioned above?




i had 5+2 Polish Telecom links connected to one server - worked fine.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-18 Thread Wojciech Puchar


use ipfw and fwd command.

for example with output section

add 1 fwd gw1_IP from DSL1_subnet to any via gw1_ethernet
add 10001 fwd gw2_IP from DSL2_subnet to any via gw2_ethernet
add 10002 fwd gw3_IP from DSL3_subnet to any via gw3_ethernet


for my scenario I asume gwX_IP the IP address of my dsl gateways. What would 
be DSLX_subnet and gwX_ethernet?


sorry i thought you are not doing nat in gateways. if you do and cat 
change it - change it, but it's not a requirement.


replace DSL1_subnet with DSL1_outgoing address etc., if all 
gateways are connected by switch replace gw*_ethernet with the same.


you must start with different outgoing addresses (simple in squid) for 
each gateway.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Gateway load balance

2009-06-17 Thread Raul I. Becette

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux (Slackware).


My post is regarding something I couldn't find information on how to 
implement it. Here's the situation:


I had a proxy server (Squid + Dansguardian) under Slackware on the LAN 
which, via 'ip route' I make it use 3 gateways connected each one to an 
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a 
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working 
fine. My problem is that I don't know how to make the server use the 
other 2 gateways I have left and balance the requests on all ADSL lines.


192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC 
to ADSL modem)

192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but 
I am quite lost about how to do it.


Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-17 Thread Gary Gatten
Adding 2 more default routes with same weight to each dsl line won't work?

- Original Message -
From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: FreeBSD Users freebsd-questions@freebsd.org
Sent: Wed Jun 17 12:18:07 2009
Subject: Gateway load balance

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux (Slackware).

My post is regarding something I couldn't find information on how to 
implement it. Here's the situation:

I had a proxy server (Squid + Dansguardian) under Slackware on the LAN 
which, via 'ip route' I make it use 3 gateways connected each one to an 
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a 
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working 
fine. My problem is that I don't know how to make the server use the 
other 2 gateways I have left and balance the requests on all ADSL lines.

192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC 
to ADSL modem)
192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but 
I am quite lost about how to do it.

Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Gateway load balance

2009-06-17 Thread Gary Gatten
PS: kudos for actually reading all that stuff!

- Original Message -
From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: FreeBSD Users freebsd-questions@freebsd.org
Sent: Wed Jun 17 12:18:07 2009
Subject: Gateway load balance

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with 
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about 
the OS and how to configure different services I used in Linux (Slackware).

My post is regarding something I couldn't find information on how to 
implement it. Here's the situation:

I had a proxy server (Squid + Dansguardian) under Slackware on the LAN 
which, via 'ip route' I make it use 3 gateways connected each one to an 
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a 
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working 
fine. My problem is that I don't know how to make the server use the 
other 2 gateways I have left and balance the requests on all ADSL lines.

192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC 
to ADSL modem)
192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but 
I am quite lost about how to do it.

Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Gateway load balance

2009-06-17 Thread Wojciech Puchar


I am a long time Linux user (desktop and server) and started with FreeBSD a 
year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about the OS 
and how to configure different services I used in Linux (Slackware).


very rare case today - someone that read books FIRST :)))



I had a proxy server (Squid + Dansguardian) under Slackware on the LAN which, 
via 'ip route' I make it use 3 gateways connected each one to an ADSL line 
and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a new 
one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working fine. My 
problem is that I don't know how to make the server use the other 2 gateways 
I have left and balance the requests on all ADSL lines.



use ipfw and fwd command.

for example with output section

add 1 fwd gw1_IP from DSL1_subnet to any via gw1_ethernet
add 10001 fwd gw2_IP from DSL2_subnet to any via gw2_ethernet
add 10002 fwd gw3_IP from DSL3_subnet to any via gw3_ethernet

please do treat above as an example of course.

Of course use right squid commands so it will select right source IP based 
on the rules you want, but as you already did id under linux i assume you 
have this practiced already.


i had 5+2 Polish Telecom links connected to one server - worked fine.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-17 Thread Wojciech Puchar

Adding 2 more default routes with same weight to each dsl line won't work?


No, because you have to route things beginning from connection 1 subnet 
through connection 1, connection 2 subnet through connection 2 etc.


Your idea will result in routing all outgoing traffic randomly through 3 
lines. At least with polish telecom it will not work. If you have 
connection with say 12.34.56.72/29 subnet, you have to send packets from 
that subnet.


And that's proper behaviour, as it blocks spoofing.



- Original Message -
From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: FreeBSD Users freebsd-questions@freebsd.org
Sent: Wed Jun 17 12:18:07 2009
Subject: Gateway load balance

Hi all

First time posting.

I am a long time Linux user (desktop and server) and started with
FreeBSD a year ago.
Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about
the OS and how to configure different services I used in Linux (Slackware).

My post is regarding something I couldn't find information on how to
implement it. Here's the situation:

I had a proxy server (Squid + Dansguardian) under Slackware on the LAN
which, via 'ip route' I make it use 3 gateways connected each one to an
ADSL line and balance the requests.
Unfortunately my server crashed and I took the oportunity to install a
new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working
fine. My problem is that I don't know how to make the server use the
other 2 gateways I have left and balance the requests on all ADSL lines.

192.168.10.9/16  proxy
192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC
to ADSL modem)
192.168.30.100/16 2nd gateway
192.168.30.1/16  3rd gateway

I found it could be done with PF (also read most of The Book of PF) but
I am quite lost about how to do it.

Any information would be greatly appreciated.

Thanks in advance

Raúl I. Becette
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
and may contain information that is privileged and/or confidential.
If you are not the intended recipient, you are hereby notified that
any review, use, dissemination, disclosure or copying of this email
and its attachments, if any, is strictly prohibited.  If you have
received this email in error, please immediately notify the sender by
return email and delete this email from your system.
/font___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Gateway load balance

2009-06-17 Thread Gary Gatten
I meant, the original source flows are nat'd to whatever outbound interface ip 
they are RRLB to. That way any internal flow can use any isp connection.  Most 
of my interesting routing, NAT, etc I do with Ci$co so not all that up on BSD's 
options.

- Original Message -
From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org
To: Gary Gatten
Cc: freebsd-questions@freebsd.org freebsd-questions@freebsd.org; 
raulbece...@unp.edu.ar raulbece...@unp.edu.ar
Sent: Wed Jun 17 13:13:59 2009
Subject: Re: Gateway load balance

 Adding 2 more default routes with same weight to each dsl line won't work?

No, because you have to route things beginning from connection 1 subnet 
through connection 1, connection 2 subnet through connection 2 etc.

Your idea will result in routing all outgoing traffic randomly through 3 
lines. At least with polish telecom it will not work. If you have 
connection with say 12.34.56.72/29 subnet, you have to send packets from 
that subnet.

And that's proper behaviour, as it blocks spoofing.


 - Original Message -
 From: owner-freebsd-questi...@freebsd.org 
 owner-freebsd-questi...@freebsd.org
 To: FreeBSD Users freebsd-questions@freebsd.org
 Sent: Wed Jun 17 12:18:07 2009
 Subject: Gateway load balance

 Hi all

 First time posting.

 I am a long time Linux user (desktop and server) and started with
 FreeBSD a year ago.
 Thanks to the book Absolute FreeBSD 2nd Edition I learned a lot about
 the OS and how to configure different services I used in Linux (Slackware).

 My post is regarding something I couldn't find information on how to
 implement it. Here's the situation:

 I had a proxy server (Squid + Dansguardian) under Slackware on the LAN
 which, via 'ip route' I make it use 3 gateways connected each one to an
 ADSL line and balance the requests.
 Unfortunately my server crashed and I took the oportunity to install a
 new one under FreeBSD 7.0-RELEASE. Squid and Dansguardian are working
 fine. My problem is that I don't know how to make the server use the
 other 2 gateways I have left and balance the requests on all ADSL lines.

 192.168.10.9/16  proxy
 192.168.10.2/16  1st gateway (1 NIC to LAN - 2 NIC
 to ADSL modem)
 192.168.30.100/16 2nd gateway
 192.168.30.1/16  3rd gateway

 I found it could be done with PF (also read most of The Book of PF) but
 I am quite lost about how to do it.

 Any information would be greatly appreciated.

 Thanks in advance

 Raúl I. Becette
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org





 font size=1
 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 
 0in 1.0pt 0in'
 /div
 This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
 /font





font size=1
div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'
/div
This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system.
/font

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Gateway load balance

2009-06-17 Thread Nikos Vassiliadis

Gary Gatten wrote:

I meant, the original source flows are nat'd to whatever outbound interface ip 
they are RRLB to. That way any internal flow can use any isp connection.  Most 
of my interesting routing, NAT, etc I do with Ci$co so not all that up on BSD's 
options.


Yes, works with ci$co, doesn't with FreeBSD ;)

You cannot add more than one next hop for any given prefix.
Well, you can achieve almost the same result, but only with
the help of a packet filter which can bypass the routing table
lookup and forward to the next hop of preference. But that's
hardly the same with ECMP which many vendors support...

Yet, that's about to change. There is ECMP support in 8.0:)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gateway load balance

2009-06-17 Thread Tim Judd
I've not yet had the luck with assigning more than one default gateway
in BSD, compared to Windows and my crash course with Linux (which my
opinion still stands as it was when I first used it).

See my thread I started earlier..
http://lists.freebsd.org/pipermail/freebsd-questions/2009-May/199653.html

The thread is broken because the replier wrote to me personally for
clarification, after which he sent his answer to the list.


I just recently tried the setfib way, and it still didn't work.  Was
getting errors but I can't recall them at the moment.  So a firewall's
routing table that's based on source/destination has to be
redirected.  I've seen the pf firewall do that.


OpenBSD's FAQ on pf (the creator of pf) is very good, consult it if
you have questions.
http://www.openbsd.org/faq/pf


On 6/17/09, Nikos Vassiliadis nvass9...@gmx.com wrote:
 Gary Gatten wrote:
 I meant, the original source flows are nat'd to whatever outbound
 interface ip they are RRLB to. That way any internal flow can use any isp
 connection.  Most of my interesting routing, NAT, etc I do with Ci$co so
 not all that up on BSD's options.

 Yes, works with ci$co, doesn't with FreeBSD ;)

 You cannot add more than one next hop for any given prefix.
 Well, you can achieve almost the same result, but only with
 the help of a packet filter which can bypass the routing table
 lookup and forward to the next hop of preference. But that's
 hardly the same with ECMP which many vendors support...

 Yet, that's about to change. There is ECMP support in 8.0:)


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org