]> git.phdru.name Git - ansible.git/blob - playbooks/redhat/roles/firewall/files/etc/rc.d/init.d/rc.masq
69be427dc34e1b53b012109bada2d3d91cf2126a
[ansible.git] / playbooks / redhat / roles / firewall / files / etc / rc.d / init.d / rc.masq
1 #!/bin/sh
2 #
3 # rc.masq - IP Masquerade
4 #
5 # Load all required IP MASQ modules
6 #
7 #   NOTE:  Only load the IP MASQ modules you need.  All current IP MASQ modules
8 #          are shown below but are commented out from loading.
9
10 # Needed to initially load modules
11 #
12 #/sbin/depmod -a
13
14 # Supports the proper masquerading of FTP file transfers using the PORT method
15 #
16 #/sbin/modprobe ip_masq_ftp
17
18 # Supports the masquerading of RealAudio over UDP.  Without this module,
19 #       RealAudio WILL function but in TCP mode.  This can cause a reduction
20 #       in sound quality
21 #
22 #/sbin/modprobe ip_masq_raudio
23
24 # Supports the masquerading of IRC DCC file transfers
25 #
26 #/sbin/modprobe ip_masq_irc
27
28
29 # Supports the masquerading of Quake and QuakeWorld by default.  This modules is
30 #   for for multiple users behind the Linux MASQ server.  If you are going to play
31 #   Quake I, II, and III, use the second example.
32 #
33 #   NOTE:  If you get ERRORs loading the QUAKE module, you are running an old
34 #   -----  kernel that has bugs in it.  Please upgrade to the newest kernel.
35 #
36 #Quake I / QuakeWorld (ports 26000 and 27000)
37 #/sbin/modprobe ip_masq_quake
38 #
39 #Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
40 #/sbin/modprobe ip_masq_quake 26000,27000,27910,27960
41
42
43 # Supports the masquerading of the CuSeeme video conferencing software
44 #
45 #/sbin/modprobe ip_masq_cuseeme
46
47 #Supports the masquerading of the VDO-live video conferencing software
48 #
49 #/sbin/modprobe ip_masq_vdolive
50
51
52 #CRITICAL:  Enable IP forwarding since it is disabled by default since
53 #
54 #           Redhat Users:  you may try changing the options in /etc/sysconfig/network from:
55 #
56 #                       FORWARD_IPV4=false
57 #                             to
58 #                       FORWARD_IPV4=true
59 #
60 echo 1 > /proc/sys/net/ipv4/ip_forward
61
62
63 # Dynamic IP users:
64 #
65 #   If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this following
66 #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
67 #       with Diald and similar programs much easier.
68 #
69 #echo "1" > /proc/sys/net/ipv4/ip_dynaddr
70
71
72 IPTABLES=/sbin/iptables
73
74
75 # DHCP:  For people who receive their external IP address from either DHCP or BOOTP
76 #        such as ADSL or Cablemodem users, it is necessary to use the following
77 #        before the deny command.  The "bootp_client_net_if_name" should be replaced
78 #        the name of the link that the DHCP/BOOTP server will put an address on to?
79 #        This will be something like "eth0", "eth1", etc.
80 #
81 #        This example is currently commented out.
82 #
83 #
84 #$IPCHAINS -A input -j ACCEPT -i bootp_clients_net_if_name -s 0/0 67 -d 0/0 68 -p udp
85
86 # Enable simple IP forwarding and Masquerading
87 #
88 #  NOTE:  The following is an example for an internal LAN address in the 192.168.0.x
89 #         network with a 255.255.255.0 or a "24" bit subnet mask.
90 #
91 #         Please change this network number and subnet mask to match your internal LAN setup
92 #