File: F30internal.def

package info (click to toggle)
ipmasq 3.4.4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 300 kB
  • ctags: 3
  • sloc: sh: 281; makefile: 48
file content (36 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# You should not edit this file.  Instead, create a file with the same
# name as this one, but with a .rul extension instead of .def.  The
# .rul file will override this one.
#
# However, any changes you make to this file will be preserved.

# forward packets among internal networks
if [ -n "$INTERNAL" ]; then
    for j in $INTERNAL; do
        ipnm_cache $j
        DESTIP=$IPOFIF
        DESTNM=$NMOFIF
        for i in $INTERNAL; do
            if [ "$i" != "$j" ]; then
                ipnm_cache $i
                case $MASQMETHOD in
                ipfwadm)
                    if [ -n "$PEEROFIF" ]; then
                        $IPFWADM -F -a accept -S $PEEROFIF/$NMOFIF -D $DESTIP/$DESTNM
                        $IPFWADM -F -a accept -D $PEEROFIF/$NMOFIF
                    fi
                    $IPFWADM -F -a accept -S $IPOFIF/$NMOFIF -D $DESTIP/$DESTNM
                    ;;
                ipchains)
                    if [ -n "$PEEROFIF" ]; then
                        $IPCHAINS -A forward -j ACCEPT -s $PEEROFIF/$NMOFIF -d $DESTIP/$DESTNM
                        $IPCHAINS -A forward -j ACCEPT -d $PEEROFIF/$NMOFIF
                    fi
                    $IPCHAINS -A forward -j ACCEPT -s $IPOFIF/$NMOFIF -d $DESTIP/$DESTNM
                    ;;
                esac
            fi
        done
    done
fi