[Ilugc] hi

  • From: smohan@xxxxxxxx (S Mohan)
  • Date: Wed, 13 Nov 2002 15:05:52 +0530

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C28B26.28668260
Content-Type: text/plain;
        charset="us-ascii"
Content-Transfer-Encoding: 7bit

Using ipchains for internet access requires masquerading. This is not
strictly web proxy as no URL controls are here - simple internal<>external
ip mapping thro' ports on a single ip.

You can use the attached file. The last three lines enable specific IPs for
masq. All other IPs are blocked. Call this from rc.local.

Mohan

-----Original Message-----
From: ilugc-admin@xxxxxxxxxxxxxxxxxx
[mailto:ilugc-admin@xxxxxxxxxxxxxxxxxx]On Behalf Of Balakumar
Arunachalam
Sent: 13 November 2002 13:54
To: ilugc@xxxxxxxxxxxxxxxxxx
Subject: [Ilugc] hi




Dear Sir/Madam,


I am a new user to this .
Basically i am working on linux 7.1 version....
i am finding problem in instaalling proxy server using
ipchans by creating a file rc.fw .....in /etc/rc.d.

Can anyone help me in giving me the correct steps to
configure the proxy using rc.fw file
Regards,

A.Balakumar

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxxxxxxx with
"unsubscribe <password> address"
in the subject or body of the message.
http://www.aero.iitm.ernet.in/mailman/listinfo/ilugc

------=_NextPart_000_0000_01C28B26.28668260
Content-Type: application/octet-stream;
        name="rc.firewall"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="rc.firewall"

#!/bin/sh=0A=
#=0A=
# rc.firewall-2.0=0A=
FWVER=3D"2.01"=0A=
#=0A=
#      - Initial SIMPLE IP Masquerade setup for 2.0.x kernels using =0A=
#        IPFWADM=0A=
#=0A=
#        Once IP Masquerading has been tested, with this simple =0A=
#        ruleset, it is highly recommended to use a stronger =0A=
#        IPTABLES ruleset either given later in this HOWTO or =0A=
#        from another reputable resource.=0A=
#=0A=
echo -e "\n\nLoading simple rc.firewall version $FWVER..\n"=0A=
=0A=
=0A=
#Setting the EXTERNAL and INTERNAL interfaces for the network=0A=
#=0A=
#  Each IP Masquerade network needs to have at least one=0A=
#  external and one internal network.  The external network=0A=
#  is where the NATing will occur and the internal network=0A=
#  should preferably be addressed with a RFC1918 private addressing=0A=
#  scheme.=0A=
#=0A=
#  For this example, "eth0" is external and "eth1" is internal"=0A=
#=0A=
#  NOTE:  If this doesnt EXACTLY fit your configuration, you must=0A=
#         change the EXTIF or INTIF variables above. For example:=0A=
#=0A=
#               EXTIF=3D"ppp0"=0A=
#=0A=
#            if you are a modem user.=0A=
#=0A=
#  ** Please change this to reflect your specific configuration **=0A=
#=0A=
EXTIF=3D"ppp0"=0A=
INTIF=3D"eth0"=0A=
echo "   External Interface:  $EXTIF"=0A=
echo "   Internal Interface:  $INTIF"=0A=
=0A=
=0A=
# Network Address of the Internal Network=0A=
#=0A=
#   This example rc.firewall file uses the 192.168.0.0 network=0A=
#   with a /24 or 255.255.255.0 netmask.=0A=
#=0A=
#    ** Change this variable to reflect your specific setup **=0A=
#=0A=
INTLAN=3D"192.168.0.0/24"=0A=
echo -e "   Internal Interface:  $INTLAN\n"=0A=
=0A=
=0A=
# Load all required IP MASQ modules=0A=
#=0A=
#   NOTE:  Only load the IP MASQ modules you need.  All current =
available IP =0A=
#          MASQ modules are shown below but are commented out from =
loading.=0A=
echo -en "Loading modules: "=0A=
=0A=
=0A=
# Needed to initially load modules=0A=
#=0A=
/sbin/depmod -a=0A=
=0A=
# Supports the proper masquerading of FTP file transfers using the PORT =
method=0A=
#=0A=
echo -en "FTP, "=0A=
/sbin/modprobe ip_masq_ftp=0A=
=0A=
# Supports the masquerading of RealAudio over UDP.  Without this module, =0A=
#       RealAudio WILL function but in TCP mode.  This can cause a reduction=0A=
#       in sound quality=0A=
#=0A=
#echo -en "RealAudio, "=0A=
#/sbin/modprobe ip_masq_raudio=0A=
=0A=
# Supports the masquerading of IRC DCC file transfers=0A=
#=0A=
#echo -en "Irc, "=0A=
#/sbin/modprobe ip_masq_irc=0A=
=0A=
# Supports the masquerading of Quake and QuakeWorld by default.  These =
modules =0A=
#   are for multiple users behind the Linux MASQ server.  If you are =
going to =0A=
#   play Quake I, II, and III, use the second example.=0A=
#=0A=
#   NOTE:  If you get ERRORs loading the QUAKE module, you are running =
an old=0A=
#   -----  kernel that has bugs in it.  Please upgrade to the newest =
kernel.=0A=
#=0A=
#echo -en "Quake, "=0A=
#Quake I / QuakeWorld (ports 26000 and 27000)=0A=
#/sbin/modprobe ip_masq_quake=0A=
#=0A=
#Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)=0A=
#/sbin/modprobe ip_masq_quake 26000,27000,27910,27960=0A=
=0A=
# Supports the masquerading of the CuSeeme video conferencing software=0A=
#=0A=
#echo -en "CuSeeme, "=0A=
#/sbin/modprobe ip_masq_cuseeme=0A=
=0A=
#Supports the masquerading of the VDO-live video conferencing software=0A=
#=0A=
#echo -en "VdoLive, "=0A=
#/sbin/modprobe ip_masq_vdolive=0A=
=0A=
echo ".  Done loading modules."=0A=
=0A=
=0A=
#CRITICAL:  Enable IP forwarding since it is disabled by default =0A=
#=0A=
#           Redhat Users:  you may try changing the options in =0A=
#                          /etc/sysconfig/network from:=0A=
#=0A=
#                       FORWARD_IPV4=3Dfalse  =0A=
#                             to=0A=
#                       FORWARD_IPV4=3Dtrue=0A=
#=0A=
echo "   enabling forwarding.."=0A=
echo "1" > /proc/sys/net/ipv4/ip_forward=0A=
=0A=
=0A=
#CRITICAL:  Enable automatic IP defragmenting since it is disabled by =
default =0A=
#=0A=
#           This used to be a compile-time option but the behavior was =
changed =0A=
#           in 2.2.12.  This option is required for both 2.0 and 2.2 =
kernels.=0A=
#=0A=
echo "   enabling AlwaysDefrag.."=0A=
echo "1" > /proc/sys/net/ipv4/ip_always_defrag=0A=
=0A=
=0A=
# Dynamic IP users:=0A=
#=0A=
#   If you get your Internet IP address dynamically from SLIP, PPP, or =
DHCP, =0A=
#   enable the following option.  This enables dynamic-ip address =
hacking in =0A=
#   IP MASQ, making the life with DialD, PPPd, and similar programs much =
easier.=0A=
#=0A=
#echo "   enabling DynamicAddr.."=0A=
#echo "1" > /proc/sys/net/ipv4/ip_dynaddr=0A=
=0A=
=0A=
#Clearing any previous configuration=0A=
#=0A=
#  Unless specified, the defaults for INPUT and OUTPUT is ACCEPT=0A=
#    The default for FORWARD is REJECT=0A=
#=0A=
echo "   clearing any existing rules and setting default policy.."=0A=
/sbin/ipfwadm -I -p accept=0A=
/sbin/ipfwadm -O -p accept=0A=
/sbin/ipfwadm -F -p reject=0A=
/sbin/ipfwadm -I -f=0A=
/sbin/ipfwadm -O -f=0A=
/sbin/ipfwadm -F -f=0A=
=0A=
=0A=
# MASQ timeouts=0A=
#=0A=
#   2 hrs timeout for TCP session timeouts=0A=
#  10 sec timeout for traffic after the TCP/IP "FIN" packet is received=0A=
#  160 sec timeout for UDP traffic (Important for MASQ'ed ICQ users)=0A=
#=0A=
echo "   setting default timers.."=0A=
/sbin/ipfwadm -M -s 7200 10 160=0A=
=0A=
=0A=
# DHCP:  For people who receive their external IP address from either =
DHCP or =0A=
#        BOOTP such as ADSL or Cablemodem users, it is necessary to use =
the =0A=
#        following before the deny command.  =0A=
#=0A=
#        This example is currently commented out.=0A=
#=0A=
#=0A=
#/sbin/ipfwadm -I -a accept -S 0/0 67 -D 0/0 68 -W $EXTIF -P udp=0A=
=0A=
=0A=
# Enable simple IP forwarding and Masquerading=0A=
# v2.01=0A=
#=0A=
#  NOTE:  The following is an example to only allow IP Masquerading for =
the =0A=
#         192.168.0.2 and 192.168.0.8 machines with a 255.255.255.0 or a =
"24" =0A=
#         bit subnet mask connected to the Internet on interface eth0.=0A=
#=0A=
#         ** Please change this network number, subnet mask, and your =
Internet=0A=
#         ** connection interface name to match your internal LAN setup =0A=
#=0A=
#         Please use the following in ADDITION to the simple rulesets =
above for =0A=
#         specific MASQ networks.  =0A=
#=0A=
/sbin/ipfwadm -F -p deny=0A=
/sbin/ipfwadm -F -a m -W $EXTIF -S 192.168.0.100/32 -D 0.0.0.0/0=0A=
/sbin/ipfwadm -F -a m -W $EXTIF -S 192.168.0.99/32 -D 0.0.0.0/0=0A=
/sbin/ipfwadm -F -a m -W $EXTIF -S 192.168.0.98/32 -D 0.0.0.0/0=0A=
/sbin/ipfwadm -F -a m -W $EXTIF -S 192.168.0.1/32 -D 0.0.0.0/0=0A=
=0A=
echo -e "\nrc.firewall-2.0 v$FWVER done.\n"=0A=
=0A=
=0A=

------=_NextPart_000_0000_01C28B26.28668260--


  • References:

Other related posts: