DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Security

OpenBSD Security Functionally paranoid!

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th October 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default Two ADSL lines , NAT , DHCP

I want run NAT and I have two ADSL lines from different providers , my system must has three Lan card , two Lan card for ADSL and one Lan card for users. I want my system get internet from TWO ADSL modem and NAT it to Users, we have 45 Users in our company.
I want my system give each user IP by DHCP and give them internet .
Can I conf my system use one ADSL line for browse and other ADSL line for Download ?
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #2   (View Single Post)  
Old 6th October 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

As both Internet connections have similar bandwidth, consider using equal-cost multipath routing. The kernel will load-balance between the two routes. OpenBSD FAQ 6.14 explains how to provision this.
Quote:
Can I conf my system use one ADSL line for browse and other ADSL line for Download ?
Q. What is the difference between an HTTP request for a small amount of data and an HTTP request for a large amount of data?

A. The amount of data received.

Q. Can I switch routes depending on the amount of data being received?

A. Not unless you know in advance that the amount of data to be sent is large. How would you?

Q. Ah, you are right. I wouldn't know. What about load balancing tools that examine HTTP requests?

A. There is relayd(8). But while it can inspect and filter HTTP requests, its load-balancing is designed to sit in front of web servers, not web clients. And it, too, will not have advance knowledge of the size of data to be received.

Q. So it is unlikely to be a solution for this?

A. Correct. It is unlikely to be useful.

Last edited by jggimi; 6th October 2015 at 01:03 PM. Reason: clarity and typo
Reply With Quote
  #3   (View Single Post)  
Old 6th October 2015
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

Quote:
Originally Posted by jggimi View Post
As both Internet connections have similar bandwidth, consider using equal-cost multipath routing. The kernel will load-balance between the two routes. OpenBSD FAQ 6.14 explains how to provision this.Q. What is the difference between an HTTP request for a small amount of data and an HTTP request for a large amount of data?

A. The amount of data received.

Q. Can I switch routes depending on the amount of data being received?

A. Not unless you know in advance that the amount of data to be sent is large. How would you?

Q. Ah, you are right. I wouldn't know. What about load balancing tools that examine HTTP requests?

A. There is relayd(8). But while it can inspect and filter HTTP requests, its load-balancing is designed to sit in front of web servers, not web clients. And it, too, will not have advance knowledge of the size of data to be received.

Q. So it is unlikely to be a solution for this?

A. Correct. It is unlikely to be useful.
Thanks.
I need conf for pf .PF get internet from two ADSL modem and NAT it for 45 users.
__________________
http://www.mfaridi.com
First site about FreeBSD and OpenBSD in persian or Farsi.
Reply With Quote
  #4   (View Single Post)  
Old 6th October 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Something similar to this rule fragment may work.
Code:
ISP1 = "<NIC for ISP 1>"
ISP2 = "<NIC for ISP 2>"
LAN  = "<NIC for the local area network>"

match out on $ISP1 from $LAN:network to any nat-to ($ISP1)
match out on $ISP2 from $LAN:network to any nat-to ($ISP2)
Rules like these are shown in the Network Address Translation chapter of the PF Users Guide. More information can also be found in the pf.conf(5) man page.

Last edited by jggimi; 6th October 2015 at 05:59 PM. Reason: typos
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting whitespace from otherwise blank lines J65nko Guides 4 18th June 2013 08:44 AM
ksh: wrap lines? Skinny OpenBSD General 11 3rd May 2013 11:30 PM
Bewan ADSL modem bewan adsl pci pico OpenBSD Installation and Upgrading 2 2nd April 2010 05:48 AM
Putting Lines to Together. bigb89 Programming 4 24th September 2008 03:59 AM
Adding multiple lines into file c0mrade Programming 4 7th June 2008 11:03 PM


All times are GMT. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick