DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 19th December 2008
dextro dextro is offline
Port Guard
 
Join Date: Dec 2008
Posts: 21
Default Obtaining multiple IPs from ISP via DHCP

I've been trying to do this for some time now.

So from what I have gathered what I need is virtual interfaces with different MAC addresses bridged to the physical interface. I think I have accomplished that much.
Code:
gateway# ifconfig nfe0
nfe0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:14:2a:19:c4:a5
        inet 216.232.236.243 netmask 0xfffff000 broadcast 216.232.239.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
gateway# ifconfig ngeth0
ngeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:5c:16:10:dd:79
        inet 207.6.112.184 netmask 0xfffff000 broadcast 207.6.127.255
gateway#
I followed most of the steps on http://ezine.daemonnews.org/200406/netgraph.html

Went something like this:
Code:
ngctl mkpeer . eiface hook ether
ifconfig ngeth0 up
ngctl mkpeer ngeth0: bridge lower link0
ngctl name ngeth0:lower mybridge
ngctl connect nfe0: mybridge: lower link1
ngctl connect nfe0: mybridge: upper link2
ngctl connect ngeth0: mybridge: upper link3
ngctl msg nfe0: setautosrc 0
ifconfig ngeth0 link 00:5c:16:10:dd:79
dhclient ngeth0
Everything works great except when I try and use ngeth0 for something like my nat.

Here is my pf.conf:
Code:
ext1="nfe0"
ext2="ngeth0"
int1="rl0"

pc1="10.0.0.2"
pc2="10.0.0.3"

set skip on lo

# nat/rdr
binat on $ext1 from $pc1 to any -> $ext1
nat on $ext2 from !($ext2) -> ($ext2:0)
rdr-anchor "miniupnpd"

# Hamachi
rdr on $ext1 proto {tcp, udp} from any to any port 39004 -> $pc1

# Xbox Live
rdr on $ext1 proto {tcp, udp} from any to any port 3074 -> $pc2

anchor "miniupnpd"
10.0.0.2 works fine, can access the internet everything works. 10.0.0.3 does not work at all. I am guessing its not pf but its how I setup the virtual interface.

Last edited by dextro; 19th December 2008 at 09:17 PM.
Reply With Quote
 

Thread Tools
Display Modes

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
DHCP Cable Connection Fail fmgil OpenBSD General 4 1st September 2009 05:18 PM
W2K DHCP Issue DrJ Other OS 4 25th May 2009 07:19 PM
problem on my end or someone leaking dhcp? Calderon FreeBSD Security 4 24th February 2009 12:31 PM
obtain 2 ips via dhcp dextro FreeBSD General 2 6th February 2009 04:56 AM
DHCP Server WeakSauceIII OpenBSD General 1 25th September 2008 03:34 AM


All times are GMT. The time now is 05:12 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