LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-09-2013, 06:50 PM   #1
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

Rep: Reputation: 16
Setting up BGP with NAT on OpenBSD


I'm trying to work out a BGP setup for the first time. I'm a sys admin, not a network admin, so bear with me.

So far, I've gotten BGP setup so I can access the internet from the OpenBSD box, but now I want to NAT the connection.

My ISP assigned a block of addresses, we'll say 10.10.10.0/24 just for fun, and they also gave one single address to use for my firewall, we'll call it 192.168.1.254. (I know these are private addresses, just pretend they're public.)

So I assigned the 192.168.1.254 address to bge0 and now I can get online. However, I'm trying to figure out what to do with the other block of addresses that are not in the same subnet so I can NAT to them.

I've tried this for /etc/hostname.bge0:
inet 192.168.1.254 255.255.255.0
inet alias 10.10.10.1 255.255.255.0

but I can't seem to NAT to the 10.10.10.1 address in pf.conf.

How can I get this to work?

TIA
 
Old 08-14-2013, 12:56 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Are you sure you are talking about BGP? Border gateway protocol?

You have a public ASN number registered with Arin? And, its endpoint is an openBSD box?
 
Old 08-14-2013, 06:09 PM   #3
IMNOboist
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: OpenBSD, Ubuntu
Posts: 60

Original Poster
Rep: Reputation: 16
Yes, I've got my AS number.

I think I've figured it out. I tried using "match" statements in my pf.conf but they didn't work so I used "pass" statements instead with nat-to and now it seems to be happy. I don't really understand what "match" actually does so I don't know why it wasn't working.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openbsd 5.2 nat/dhcp server p3tter *BSD 6 02-26-2013 03:59 PM
[SOLVED] OpenBSD 5.1 as NAT Gateway sasser *BSD 4 09-03-2012 04:38 AM
OpenBSD pf NAT question IMNOboist *BSD 2 08-29-2012 05:08 AM
OpenBSD 4.9 PF and NAT do not work lcxpics *BSD 5 09-20-2011 07:49 AM
[OpenBSD 3.9] NAT Configuration/ Static IP Slycer *BSD 4 05-16-2006 04:14 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration