B
B
beliand2017-09-29 11:38:58
FreeBSD
beliand, 2017-09-29 11:38:58

How to use tags (tags, tagged) in ipfw nat, FreeBSD11?

Good afternoon! Faced the problem of routing traffic over two active Internet channels. I came to the conclusion that you need to use labels in ipfw. But they don't want to work for me at all. Here is a snippet:

ipfw add 01500 skipto 03000 tag 1 tcp from any to 195.128.ххх.ххх in recv tun1 keep-stat
ipfw add 01600 setfib 1 tcp from 192.168.0.0/24 to not 192.168.0.0/24 tagged 1 keep-state

So, if you use rule 01600 without the tagget 1 parameter , packets always leave through the second channel. But I need to give dynamics, and I can’t get the tags to work. What can be wrong? Maybe I'm misunderstanding the meaning of labels? Does this label disappear when the first pass through the rules is completed, or does it remain on the second pass?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question