View Full Version : IPFW Redirect
vpeleh
November 17th, 2008, 12:14
Hi
Somebody know? can ipfw do redirect packet
(Something like to PF
rdr on ! $ext_if proto tcp from <blocked_user> to any port 80 -> 192168.192.168 port 8080
)
ipfw nat do not work in this way, it only redirect packet that destination to local router...
If somebody know how do that, pleae help
Thanks
raVen
November 17th, 2008, 12:45
ipfw fwd?
vpeleh
November 17th, 2008, 13:07
ipfw fwd only forward packet to destination(it do not change destination field in packet)
aragon
November 18th, 2008, 01:15
I'm thinking you need to use natd and one of its -redirect_* parameters. Then use ipfw divert to divert the relevant traffic through natd.
aragon
November 18th, 2008, 01:23
Something like this:
natd -redirect_port tcp 192.168.192.168:8080
ipfw add 100 divert natd tcp from blocked_user to any 80 in
vpeleh
November 19th, 2008, 13:12
Thanks
I will try
jleal2003
December 9th, 2008, 02:37
You can also use a port redirector like rinetd , it is a very useful tool!! try and let us know what happen!
r-c-e
December 13th, 2008, 00:36
You can also use a port redirector like rinetd , it is a very useful tool!! try and let us know what happen!
I use rinetd a lot when migrating sites from one server to another and love it, easy to setup and can take a beating.
komeylian
December 21st, 2008, 14:23
hi, vpeleh
as well as you want in above (Something like to PF rdr on ! $ext_if proto tcp from <blocked_user> to any port 80 -> 192168.192.168 port 8080)
you should follow bellow :
1) load ipfw module
# kldload ipfw.ko
2) check it by
# kldstat
3) # ipfw add allow ip from any to any
4) # ipfw add fwd 192.168.192.168:8080 tcp from <blocked_user> to any 80
5) for check it use # ipfw show
have fun.
mlevel
March 3rd, 2011, 18:26
This rule doesn`t change destination IP-address in TCP-packet!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.