Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


Unifix party firewall

Author:mike - Fri Feb 7 23:49:38 2003

#!/bin/sh

  # default
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

  # flush
iptables -t filter -F INPUT
iptables -t filter -F FORWARD
iptables -t filter -F OUTPUT
iptables -t nat -F PREROUTING
iptables -t nat -F POSTROUTING

  # aktivere masquerade

iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 -d 10.10.0.0/24
iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 -d 10.10.6.0/24
iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 -p tcp --dport 8080
iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 -p tcp --dport 80
iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 -p tcp --dport 6667

iptables -t nat -A POSTROUTING -p tcp --dport 5190 -j MASQUERADE
iptables -t nat -A POSTROUTING -j MASQUERADE -p icmp
iptables -t nat -A POSTROUTING -j MASQUERADE -p udp

iptables -t nat -A PREROUTING -p tcp --dport 6667 -j DNAT --to-destination 62.121.17
0.37

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.10.0.2

Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk