# IPtables + MARK

## KA

Good afternoon, the problem consists costs such, is PC and the server, on PC marks in iptables normally works, and on a server is not present, a difference that on a server it looks:

Chain lbilling (1 references)

target     prot opt source               destination

MARK       all  --  0.0.0.0/0            192.168.0.3         MARK xset 0xa/0xffffffff

MARK       all  --  0.0.0.0/0            192.168.0.1         MARK xset 0xa/0xffffffff

On PC

Chain lbilling (1 references)

target     prot opt source               destination

MARK       all  --  0.0.0.0/0            192.168.0.3         MARK set 0xa

MARK       all  --  0.0.0.0/0            192.168.0.1         MARK set 0xb

That it is required to make on a server that it as looked as well as on PC

----------

## Bircoph

Do not use --set-xmark in your rules (when you are calling actual iptables command from the script), use --set-mark insted. The difference is that xmark XOR bits instead of OR them as mark does.

BTW, I suggest you to use connmark instead of mark: this will save resources.

----------

## KA

 *Bircoph wrote:*   

> Do not use --set-xmark in your rules (when you are calling actual iptables command from the script), use --set-mark insted. The difference is that xmark XOR bits instead of OR them as mark does.
> 
> BTW, I suggest you to use connmark instead of mark: this will save resources.

 

ОК very tnx.

----------

