File

advertisement
IPTABLES: The iptables utility controls the network packet filtering code in the Linux
kernel. If you need to set up firewalls and/or IP masquerading, you should install this package.
Objective



How to configure IPTABLES
How to apply service or rule in IPTABLES
How to allow service to client
Requirement



Router+Relay+IPTABLES in once machine
 IP: 192.168.1.1 for Router
 IP: 172.168.1.222 for access internet
 IP: 10.10.10.1 for scope client
DHCP+DNS+FTP+SAMBA+LDAP in once machine
 IP: 192.168.1.2
Client in once machine
 IP: 10.10.10.1-10.10.10.254
Configuration
1 / Service that install and configure
DNS
DHCP
LDAP
SAMBA
FTP
IPTABLES
2/ How to create rule and apply rule to client






Change from /etc/init.d/skeleton to /etc/init.d/firewall
Create short cut for restart this rule by go to /sbin
After we go to /sbin and type command ln –s /etc/init.d/firewall rcfirewall
After we do already we create rule in /etc/init.d/firewall
Create variable and need to write open routing
After we create variable and open routing already we can drop all server and allow
service by we want
Drop all chain and policy
Allow ping
Allow loopback
Allow service DNS
Allow service DHCP
Allow service SHH to server
Allow service SHH to router
Allow file samba
Allow service ftp server
Allow client access internet
Allow service LDAP
3/ Client used service DHCP, DNS, FTP, SAMBA , LDAP and SHH
DNS and DHCP
SAMBA and FTP
LDAP and SAMBA
4/ Client can access SHH from server and Router
Client access SHH from Server
Client access SHH from Router
a
5/ Client can access internet
Download