Redirect to a ip address
-
hi, i'm modifying my pfsense 1.2.3 just for fun (and learn). I want to redirect all the outgoing traffic of a single ip (i.e 10.0.0.100) to one ip address.
I've seen some tutorials for freebsd using things like:ipfw add divert natd ip from any to any
natd -interface en1 -target_address 255.255.255.255 -alias_address 173.203.210.155 -reversebut the first sentence throws an error like
ipfw: getsockopt(IP_FW_ADD): Invalid argument
I hope that someone here can help me to figure it out. Regards!
-
pfsense 1.2.3 is several years old. You should upgrade to the current version, which is 2.0.1
You can do redirection from the pfsense WebGUI (BTW pfSense favors "pf" rather than "ipfw"). Anyway, if you want to transparently redirect all IP traffic (without nat'ting) from 10.0.0.100 to e.g. 10.1.0.1 using ipfw rather than pf, you could try something like:
fwd 10.1.0.1 ip from 10.0.0.100 to any in
-
ok, thanks! I will update to pfsense 2 soon, i was just too busy :)
-
Note that you should do everything via the web interface, not on the command line (at least until you fully understand the differences between pfSense and a standard FreeBSD install).
-
@Cry:
Note that you should do everything via the web interface, not on the command line (at least until you fully understand the differences between pfSense and a standard FreeBSD install).
Well, that's why i'm doing this, just for fun and learning ;D
Now, another question related, i know that if i do:
fwd 10.1.0.1 ip from 10.0.0.100 to any in
this will redirect, but it will not change the header in the packets, so i can't redirect to a external website (i.e. google). In that case ¿did i need to use natd? ¿can i do it from the webgui? (i've tried with nat options but with no luck)
Thanks for your answers!