EXAMPLES
You have a network (192.168.2.0/24) connected throu your firewall
(192.168.2.1/24) to the internet. Your map and your nodelist should look
like:
Add the following service to your clientnet:
Use:
tcp http internet
You get:
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.1.1/32
-j DENY
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.2.1/32
-j DENY
ipchains -A input -i eth1 -p tcp -s 192.168.2.0/24 --sport 1024:
-d 0.0.0.0/0 --dport 80 -j ACCEPT
ipchains -A input -i eth1 -j DENY -l
ipchains -A input -i ser0 -p ip -s 0.0.0.0/0 -d 192.168.2.1/32
-j DENY
ipchains -A input -i ser0 -p tcp -s 0.0.0.0/0 --sport 80 -d 192.168.2.0/24
--dport 1024: !-y -j ACCEPT
ipchains -A input -i ser0 -j DENY -l
As you can see fwmap denies all packets to your firewall automatically.
If you think fwmap doesn't because there's no DENY for 192.168.1.1/32 on
ser0 I can say fwmap removed this rule because there's a DENY for every
packet.
Now we add a logserver on firewall/eth0 and add the following services
to firewall:
Provide:
tcp telnet logserver
Use:
udp syslog logserver
You get:
ipchains -A input -i eth0 -p tcp -s 192.168.3.2/32 --sport 1024:
-d 192.168.3.1/32 --dport 23 -j ACCEPT
ipchains -A input -i eth0 -p udp -s 192.168.3.2/32 --sport 514
-d 192.168.3.1/32 --dport 1024: -j ACCEPT
ipchains -A input -i eth0 -j DENY -l
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.3.2/32
-j DENY
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.1.1/32
-j DENY
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.2.1/32
-j DENY
ipchains -A input -i eth1 -p ip -s 0.0.0.0/0 -d 192.168.3.1/32
-j DENY
ipchains -A input -i eth1 -p tcp -s 192.168.2.0/24 --sport 1024:
-d 0.0.0.0/0 --dport 80 -j ACCEPT
ipchains -A input -i eth1 -j DENY -l
ipchains -A input -i ser0 -p ip -s 0.0.0.0/0 -d 192.168.2.1/32
-j DENY
ipchains -A input -i ser0 -p tcp -s 0.0.0.0/0 --sport 80 -d 192.168.2.0/24
--dport 1024: !-y -j ACCEPT
ipchains -A input -i ser0 -j DENY -l
|