Review your favorite Linux distribution.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


Search this Thread
Old 08-09-2013, 07:50 PM   #1
Registered: Nov 2003
Location: Northern Utah
Distribution: OpenBSD, Ubuntu, Linux Mint, Knoppix
Posts: 56

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 just for fun, and they also gave one single address to use for my firewall, we'll call it (I know these are private addresses, just pretend they're public.)

So I assigned the 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 alias

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

How can I get this to work?

Old 08-14-2013, 01:56 PM   #2
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,369
Blog Entries: 1

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
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, 07:09 PM   #3
Registered: Nov 2003
Location: Northern Utah
Distribution: OpenBSD, Ubuntu, Linux Mint, Knoppix
Posts: 56

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:59 PM
[SOLVED] OpenBSD 5.1 as NAT Gateway sasser *BSD 4 09-03-2012 05:38 AM
OpenBSD pf NAT question IMNOboist *BSD 2 08-29-2012 06:08 AM
OpenBSD 4.9 PF and NAT do not work lcxpics *BSD 5 09-20-2011 08:49 AM
[OpenBSD 3.9] NAT Configuration/ Static IP Slycer *BSD 4 05-16-2006 05:14 AM

All times are GMT -5. The time now is 11:10 AM.

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