source: pkg/parsix-ics/trunk/ics @ 3

Revision 3, 637 bytes checked in by alanbach-guest, 7 years ago (diff)

[svn-inject] Installing original source of parsix-ics

Line 
1#!/bin/bash
2# `Copyright 2006 Parsix GNU/Linux project.
3# Released under GNU/GPL
4# Edit INTERFACE to meet your needs.
5
6IPTABLES=/sbin/iptables
7INTERFACE=ppp0
8
9case "$1" in
10    start)
11        $IPTABLES -F -t nat
12        $IPTABLES -A POSTROUTING -t nat -o $INTERFACE -j MASQUERADE
13        echo 1 > /proc/sys/net/ipv4/ip_forward
14        echo Starting Internet Connection Sharing...
15        ;;
16    stop)
17        $IPTABLES -F -t nat
18        echo 0 > /proc/sys/net/ipv4/ip_forward
19        echo Stopping Internet Connection Sharing...
20        ;;
21    restart)
22        $0 stop
23        $0 start
24        ;;
25    *)
26        echo "usage: $0 {start|stop|restart}"
27        ;;
28esac
29exit 0
Note: See TracBrowser for help on using the repository browser.