Hi, The following steps may be helpful.
Method 1: eth0 - The network interface to which BSNL modem is connected (IP Eg: 192.168.1.2) eth1 - The network interface to which switch/hub is connected for internal networking (IP Eg: 192.168.0.100) (or vice versa) sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo su - echo "1" > /proc/sys/net/ipv4/ip_forward Set the gateway of the client machines to the IP of the server. Example client config: IP: 192.168.0.25 netmask: 255.255.255.0 gateway: 192.168.0.100 dns (nameserver): 192.168.0.100 or any public DNS server IP ================================================= Method 2: install squid on server sudo apt-get install squid3 add the following to /etc/squid3/squid.conf acl mynetwork src 192.168.0.0/24 http_access allow mynetwork then restart squid sudo /etc/init.d/squid3 restart Open firefox in client machine and change the proxy address of the browser to the IP of the server. (Tools>Options>Advanced>Network>Settings and select manual proxy configuration. HTTP Proxy: 192.168.0.100. Port: 3128) Regards, Sreenadh On Fri, May 21, 2010 at 2:14 PM, pappu ps <[email protected]> wrote: > > hi, > > myself pappu from Rajagiri College. i am dealing with the public relation > section of the college's community service wing RAJAGIRI outREACH. i have > minimal information about computing. but using linux for the past 2 years. > > our office is using a windows network with nearly 20 computers connected. and > of course there is lot of trouble always. due to constant virus attack, the > server that share internet connection gets crashed every time. so i suggested > to use a linux computer that share internet. > > for this purpose, i have set up a machine with ubuntu 10.04. i could > configure the network and all - one internal and one addl card lan. (it shows > eth0 and eth1). i could also configure the BSNL broadband connection. but i > am not able to share the connection with other computers in the windows > network. i have gone through many steps described in ubuntu forums. ( > https://help.ubuntu.com/community/Internet/ConnectionSharing is one) > > > > this was the procedure and status.! > > ch...@child-desktop:~$ sudo iptables -A FORWARD -i eth0 -o eth1 -s > 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT > > ch...@child-desktop:~$ sudo iptables -A FORWARD -m conntrack --ctstate > ESTABLISHED,RELATED -j ACCEPT > > ch...@child-desktop:~$ sudo iptables -A POSTROUTING -t nat -j MASQUERADE > > ch...@child-desktop:~$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" > > ch...@child-desktop:~$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERAD > iptables v1.4.4: can't initialize iptables table `nat': Permission denied > (you must be root) > Perhaps iptables or your kernel needs to be upgraded. > > ch...@child-desktop:~$ sudo iptables -t nat -A POSTROUTING -o eth0 -j > MASQUERAD > iptables v1.4.4: Couldn't load target > `MASQUERAD':/lib/xtables/libipt_MASQUERAD.so: cannot open shared object file: > No such file or directory > > Try `iptables -h' or 'iptables --help' for more information. > > i stuck at this step. i have no idea what happened when i typed these codes!!! > > please help me resolve this issue. > also, is there any other simple methods to share the connections ? > > i would be greatful if you can suggest some simple methods. i mean codes with > explanation. > > > Thanks and regards > > > Pappu > > _______________________________________________ > Indian Libre User Group Cochin Mailing List > http://www.ilug-cochin.org/mailing-list/ > http://mail.ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org > #[email protected] _______________________________________________ Indian Libre User Group Cochin Mailing List http://www.ilug-cochin.org/mailing-list/ http://mail.ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org #[email protected]
