home " subscribe " advertise " customer service " back issues " " contacts
How To
Developer's Den
![]() |
![]()
Setting Up IP Masquerade
Setting Up IP Masquerade
|
Listing One: IP-Masq Minimal Ruleset.
-- #!/bin/sh # # rc.firewall - Initial SIMPLE IP Masquerade test for 2.1.x and 2.2.x kernels using IPCHAINS # #Initialize the IP Masquerade kernel modules /sbin/depmod -a #Load the kernel modules # # NOTE: Only enable the modules you need and leave the rest "#"ed out # # Supports the proper masquerading of FTP file transfers using the PORT /sbin/modprobe ip_masq_ftp # Supports the masquerading of RealAudio over UDP. Without this module, # RealAudio WILL function but in TCP mode. This can cause a reduction # in sound quality /sbin/modprobe ip_masq_raudio # Supports the masquerading of IRC DCC file transfers # /sbin/modprobe ip_masq_irc # Supports the masquerading of Quake I, II, III and QuakeWorld by default. # This modules is for multiple users behind the Linux IP-Masq server. # /sbin/modprobe ip_masq_quake ports=26000,27000,27910 # Supports the masquerading of the CuSeeme video conferencing software # /sbin/modprobe ip_masq_cuseeme #Supports the masquerading of the VDO-live video conferencing software # /sbin/modprobe ip_masq_vdolive # Dynamic IP users: # #If you get your Internet IP address dynamically from SLIP, PPP, or DHCP, enable this # option. # #echo "1" > /proc/sys/net/ipv4/ip_dynaddr #Enable IP Forwarding in the Linux kernel. A requirement to later enable #IP Masq. # echo "1" > /proc/sys/net/ipv4/ip_forward # Enable MASQ timeouts # # 2 hrs timeout for TCP session timeouts # 10 sec timeout for traffic after the TCP/IP "FIN" packet is received # 60 sec timeout for UDP traffic # ipchains -M -S 7200 10 160 # Enable simple IP Masquerading for the internal 192.168.0.x network # ipchains -P forward DENY ipchains -A forward -s 192.168.0.0/24 -j MASQ echo "/etc/rc.d/rc.firewall done."
home " subscribe " advertise " customer service " back issues " " contacts