@@ -143,11 +143,11 @@ Documentation is included as comments in the output, here is a dump using the st
143143# --sport, etc.
144144
145145#Example Provider 1
146- #[0:0] -A PREROUTING -i eth0 -m state --state NEW -p tcp --dport XXX -j CONNMARK --set-mark 1
146+ #[0:0] -A PREROUTING -i eth0 -m conntrack --ctstate NEW -p tcp --dport XXX -j CONNMARK --set-mark 1
147147#Example Provider 2
148- #[0:0] -A PREROUTING -i eth0 -m state --state NEW -p tcp --dport XXX -j CONNMARK --set-mark 2
148+ #[0:0] -A PREROUTING -i eth0 -m conntrack --ctstate NEW -p tcp --dport XXX -j CONNMARK --set-mark 2
149149#Example Provider 3
150- #[0:0] -A PREROUTING -i eth0 -m state --state NEW -p tcp --dport XXX -j CONNMARK --set-mark 3
150+ #[0:0] -A PREROUTING -i eth0 -m conntrack --ctstate NEW -p tcp --dport XXX -j CONNMARK --set-mark 3
151151
152152#Mark packets with the outgoing interface:
153153#
@@ -165,21 +165,21 @@ Documentation is included as comments in the output, here is a dump using the st
165165#New inbound connections: mark the connection with the incoming interface.
166166
167167#Example Provider 1
168- [0:0] -A PREROUTING -i eth1 -m state --state NEW -j CONNMARK --set-mark 1
168+ [0:0] -A PREROUTING -i eth1 -m conntrack --ctstate NEW -j CONNMARK --set-mark 1
169169#Example Provider 2
170- [0:0] -A PREROUTING -i eth2 -m state --state NEW -j CONNMARK --set-mark 2
170+ [0:0] -A PREROUTING -i eth2 -m conntrack --ctstate NEW -j CONNMARK --set-mark 2
171171#Example Provider 3
172- [0:0] -A PREROUTING -i eth3 -m state --state NEW -j CONNMARK --set-mark 3
172+ [0:0] -A PREROUTING -i eth3 -m conntrack --ctstate NEW -j CONNMARK --set-mark 3
173173
174174#New outbound connections: mark the connection with the outgoing interface
175175#(chosen by the multipath routing).
176176
177177#Example Provider 1
178- [0:0] -A POSTROUTING -o eth1 -m state --state NEW -j CONNMARK --set-mark 1
178+ [0:0] -A POSTROUTING -o eth1 -m conntrack --ctstate NEW -j CONNMARK --set-mark 1
179179#Example Provider 2
180- [0:0] -A POSTROUTING -o eth2 -m state --state NEW -j CONNMARK --set-mark 2
180+ [0:0] -A POSTROUTING -o eth2 -m conntrack --ctstate NEW -j CONNMARK --set-mark 2
181181#Example Provider 3
182- [0:0] -A POSTROUTING -o eth3 -m state --state NEW -j CONNMARK --set-mark 3
182+ [0:0] -A POSTROUTING -o eth3 -m conntrack --ctstate NEW -j CONNMARK --set-mark 3
183183
184184COMMIT
185185
@@ -245,9 +245,9 @@ COMMIT
245245#This is just a very basic example, add your own rules for the INPUT chain.
246246
247247[0:0] -A INPUT -i lo -j ACCEPT
248- [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
248+ [0:0] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
249249
250- [0:0] -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
250+ [0:0] -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
251251
252252[0:0] -A FORWARD -i eth0 -o eth1 -j LAN_WAN
253253[0:0] -A FORWARD -i eth0 -o eth2 -j LAN_WAN
0 commit comments