Redirect internal traffic (only port 80) to another link

Tom Wuyts eenpint at hotmail.com
Wed May 7 09:57:07 UTC 2008


set in your rc.conf next line

natd_flags="-f /etc/natd.conf"

and then add the file natd.conf in your etc/ folder

interface em0 (if i'm not mistaking, i don't completely get your question)
use_sockets yes
dynamic yes
redirect_port tcp 192.168.7.105:80 80

this should send all packets arriving at port 80 from your 10.0.0.0 network to 192.168.7.105

and then restart your network
/etc/netstart restart

if he complains about natd, while restarting your network, kill natd with "pkill natd" and then restart your network

hope it helps,

tom


> Date: Tue, 6 May 2008 17:46:06 -0300
> From: marconemlt at gmail.com
> To: freebsd-ipfw at freebsd.org
> Subject: Redirect internal traffic (only port 80) to another link
> 
> Hi,
> 
> I have 2 links, one em0 and other in vlan2 interface.
> My default route is em0.
> 
> The problem is:
> I want to direct all internal Internet traffic (port 80) for the link in
> vlan2 interface.
> How to do it with the IPFW?
> 
> Some information:
> 
> Link em0 interface - 10.40.1.0
> Interna network: em1 interface - 10.10.18.0
> Link vlan2 interface - 192.168.7.0
> 
> The vlan2 interface is on Trunk port in switch. It's work.
> 
> We have tried the following alternatives:
> 
> I created another route:
> Route ADD 192.168.7.107 192.168.7.105
> 
> ipfw add 00019 divert from 8668 ip 10.10.18.0/24 to any 80 via vlan2
> Traffic continued through dedicated link.
> 
> ipfw add 00019 fwd 192.168.7.105 tcp from 10.10.18.0/24 to any 80
> redirect the traffic on the link vlan2, but did not return anything.
> 
> ipfw add 00019 divert from 8669 ip 10.10.18.0/24 to any 80 via vlan2
> natd-s-m-n-vlan2 p 8669
> Anything!
> 
> All attempts without success.
> Thus, how I can redirect my internal Internet traffic to the VLAN2 link with
> IPFW ?
> 
> Thank's,
> Marcone
> _______________________________________________
> freebsd-ipfw at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe at freebsd.org"

_________________________________________________________________
Nieuwe lente...Een nieuw online leven...Gratis dankzij Windows Live
http://get.live.com


More information about the freebsd-ipfw mailing list