mudasir wrote:And one more thing.
I just want to know what does the following lines do....
iptables -t mangle -F maccheck
iptables -t mangle -X maccheck
iptables -t mangle -N maccheck
iptables -t mangle -I PREROUTING -i eth2 -p tcp -j maccheck
iptables -t mangle -A maccheck -j MARK --set-mark 1
iptables -t mangle -A maccheck -j RETURN
iptables -t nat -A PREROUTING -m mark --mark 1 -p tcp -j DNAT --to-destination=10.10.10.1:81
I found them i a firewall script but dont know the function of these lines.
looking forward for your help
iptables -t mangle -F maccheck
Flushing Chain maccheck at mangle table
iptables -t mangle -X maccheck
Deleting Chain maccheck at mangle table
iptables -t mangle -N maccheck
Creating new chain with name maccheck at mangle table
iptables -t mangle -I PREROUTING -i eth2 -p tcp -j maccheck
Jumping All tcp traffic coming from ethernet 2 to chain maccheck at mangle table
iptables -t mangle -A maccheck -j MARK --set-mark 1
Appending traffic to chain machceck with mark 1 (which not matched through allowed macs list)
iptables -t mangle -A maccheck -j RETURN
Returning the packets to stop traveling through the chain
iptables -t nat -A PREROUTING -m mark --mark 1 -p tcp -j DNAT --to-destination=10.10.10.1:81
Redirecting the all tcp mark 1 packets to host 10.10.10.1 port 81