[bwm-tools-tech] redirect target use
Brought to you by:
nkukard
From: confruo de M. <co...@ho...> - 2006-10-10 10:06:46
|
I thought i share this with the rest, for i have been banging my head over it, but in the end it was pretty logical. Trying to use a transparant proxy (frox in this example), i used to load my firewall.xml, and add the redirect rule manually, for i thought it should be somewhere under the <nat> section. something like;iptables -t nat -I PREROUTING -s 192.168.1.0/24 -p tcp --dport 21 -j REDIRECT --to-ports 2121 But now in the global section i added the class <class name="redirect_frox_zone1"> <address src="192.168.1.0/24" proto="tcp" dst-port="21" /> </class> and under table filter I added <table name="nat"> <chain name="PREROUTING"> <rule target="REDIRECT --to-ports 2121"> redirect_frox_zone1; </rule> </chain> </table> which gave me; Chain PREROUTING (policy ACCEPT 23 packets, 4025 bytes) pkts bytes target prot opt in out source destination 0 0 REDIRECT tcp -- * * 192.168.1.0/24 0.0.0.0/0 tcp dpt:21 redir ports 2121 Ow, happy days :-) _________________________________________________________________ De nieuwste Messenger is live! Download nu http://imagine-msn.com/messenger/launch80/default.aspx?locale=nl-nl |