Redirect internal traffic (only port 80) to another link

Marcone Theisen marconemlt at gmail.com
Tue May 6 21:11:55 UTC 2008


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


More information about the freebsd-ipfw mailing list