iptables
Workign on this
OUTPUT
Section titled “OUTPUT”DNS Blocking
Section titled “DNS Blocking”(May not working)
iptables -I OUTPUT -p udp --dport 53 -m string --string facebook --algo bm -j DROPRouting
Section titled “Routing”POST Routing
Section titled “POST Routing”iptables -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADEMasquerade
Section titled “Masquerade”iptables -t nat -A POSTROUTING -j MASQUERADEPRE Routing
Section titled “PRE Routing”iptables -A PREROUTING -i eth0 -p tcp -m tcp -s 100.100.100.5 -d 192.168.1.30 --dport 443 -j DNAT --to-destination 192.168.1.100:443Port Forwarding
Section titled “Port Forwarding”Forward traffic on port 2222 to IP 10.1.1.2 on port 22
iptables -t nat -A PREROUTING -p tcp --dport 2222 -j DNAT --to-destination 10.1.1.2:22Disable PING and MTR / traceroute request
For iptables rules
iptables -A OUTPUT -p icmp --icmp-type 0 -j DROPiptables -A OUTPUT -p icmp --icmp-type 8 -j DROPiptables -A OUTPUT -p icmp --icmp-type 11 -j DROPiptables -A OUTPUT -p icmp --icmp-type 30 -j DROPTo disable traceroute
iptables -A INPUT -p icmp -m ttl --ttl-eq 1 -j DROPiptables -A INPUT -p udp -m ttl --ttl-eq 1 -j DROPiptables -A INPUT -p tcp -m ttl --ttl-eq 1 -j DROP***Reference: ***