IPFW reply-to dup-to in ipfw

Hello everyone, I would like to know if anyone knows the syntax of ipfw for reply-to and dup-to of pf and if you could write me some examples. Thanks in advance
 
Hello.
You can use a combination of "tag", "skipto" and "fwd" keywords. Next example was found on internet:
Code:
ipfw add 100 skipto 300 tag 1 in recv $ext_if1 keep-state
ipfw add 200 skipto 300 tag 2 in recv $ext_if2 keep-state
ipfw add 300 allow { recv $ext_if1 or recv $ext_if2 }  # inbound packets
ipfw add 400 allow in recv $int_if  # for internal NIC
ipfw add 500 fwd $gw1 tagged 1      # reply-to GW1 packets, which tagged with "tag1"
ipfw add 600 fwd $gw2 tagged 2      # reply-to GW2 packets, which tagged with "tag2"

PS. I'm not sure that all of the rules work because this example from 2009 year.
 
Hello.
You can use a combination of "tag", "skipto" and "fwd" keywords. Next example was found on internet:
Code:
ipfw add 100 skipto 300 tag 1 in recv $ext_if1 keep-state
ipfw add 200 skipto 300 tag 2 in recv $ext_if2 keep-state
ipfw add 300 allow { recv $ext_if1 or recv $ext_if2 }  # inbound packets
ipfw add 400 allow in recv $int_if  # for internal NIC
ipfw add 500 fwd $gw1 tagged 1      # reply-to GW1 packets, which tagged with "tag1"
ipfw add 600 fwd $gw2 tagged 2      # reply-to GW2 packets, which tagged with "tag2"

PS. I'm not sure that all of the rules work because this example from 2009 year.
Thank you so much. What does mean '$gw1'?
Do you also know dup-to ipfw syntax? thanks in advance
 
it simulates a policy based routing
gw1 and gw2 are the gateways for 2 providers
so packets that come in thru isp1 are replied thru isp1 and packets that come in thru isp2 are replied thru isp2
 
it simulates a policy based routing
gw1 and gw2 are the gateways for 2 providers
so packets that come in thru isp1 are replied thru isp1 and packets that come in thru isp2 are replied thru isp2
Thank you so much. Do you know how to express the syntax of dup-to or reply-to ipfw commands?
 
Back
Top