DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 1st February 2009
dextro dextro is offline
Port Guard
 
Join Date: Dec 2008
Posts: 21
Default nat HELP

So, I have been running FreeBSD as my router for sometime now and like it a lot, ran into a problem recently however

I've managed to forward ports to PCs across my network without problem until I tried to forward some UDP for a game, it doesn't work.

Code:
nat on $ext1 from !($ext1) -> ($ext1:0)
rdr on $ext1 proto {tcp, udp} from any to any port {1234} -> $pc1
above configuration does not work. I think the packets make it to the game but PF does something to them and the game doesn't recognize them (I'm no expert but that's what I've gathered so far).

Code:
binat on $ext1 from $pc1 to any -> $ext1
above works fine, games and all applications on pc1 can connect out and accept connections, one major flaw though, the rest of my network has no internet connectivity!

Some people have suggested I get another IP from my ISP and binat 1 to pc1 and nat the second to the rest of my lan, this would be fine if my ISP allowed static IPs. I am actually allowed 2 IPs but they have to be obtained with DHCP and can only obtain one per interface so as far as I can tell... I would have to setup my network as layed out in the attached image. Seems a little crazy to me to change the network so much (1 new switch, 2 new nic in gateway) just to get a game working. I should also note the game worked fine when I forwarded port 1234 when I was using some $20 Linksys POS.

Finally, I had the idea to create a virtual interface on the gateway and bridge it to my modem's interface, this might allow me to set the MAC sent to my ISP DHCP server thus it leasing me the second IP. No idea how to create virtual interfaces or bridge on FreeBSD though :P
( page that give me this idea http://ezine.daemonnews.org/200406/netgraph.html )

Thanks in advance to anyone that helps me figure this out!!
Attached Images
File Type: jpg insane.jpg (16.0 KB, 64 views)
Reply With Quote
 


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


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