Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 35

Warning: include(http://www.linux-faqs.com/HOWTO/header.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 35

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 35

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 36

Warning: include(http://www.linux-faqs.com/HOWTO/header.bottom.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 36

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.bottom.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 36
 
FAQS
» Advanced Routing & Traffic Control
» General FAQ
» Squid Proxy Server
» Sendmail
» Fetchmail
» Postfix
» Connecting Mobile Phone
» Paging from Linux
» Standard Commands
» Some common terms
HOW-TOs
» ADSL Bandwidth Management
» Compile Apache
» Make a Bootdis
» Linux-Windows9x-Grub
» Linux-Windows
» Linux Crash Recovery
» Optimise Squid
» Block websites in Squid
» broadcast webcam in linux
» Compile RedHat Linux kernel
» Implement Firewall Security
» Increase Harddrive Performance
» Mount NTFS filesystem
» Patch / rebuild SRPM
» Secure Linux
» Set up a DHCP Server
» Set up an FTP server
» Set up Linux as a Router
» Use Cron
Miscellaneous
» All Ports
» Hardware Guides
» Hardware Review Guides
» Fav Troubleshooting forums
» Spammers fetch email addresses
» Mounting NTFS in linux


 

6. Simple IP Masquerading

To allow sharing of your internet conenction you can eitehr use a proxy server or IP Masquerading. I'll cover IP Masquerding as it's simple to set up on the other client machines. I use a 2.4.x generation kernel and in effect I use IPTables. If you use a 2.2.x or 2.0.x kernel then you need the IP Masquerading HOWTO .

This part of the HOWTO assumes that your Netfilter software is modularised, if it isnt then no big deal, either ignore the modprobe lines or recompile your kernel.

Simple now, just run the commands:

modprobe iptable_nat

iptables -t nat -F POSTROUTING

iptables -t nat -A POSTROUTING -o ppp0 -s 10.0.0.0/16 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

Note: The space between 1 and > is vital. It seems not to activate the IP Forwarding if the space is not there.

Change the ppp0 and/or the 10.0.0.0/16 for your relevant network settings and put that file either before the case "$1" in in the internet file or somewhere in your startup.


 
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 210

Warning: include(http://www.linux-faqs.com/HOWTO/body.right.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 210

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/body.right.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 210


 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 215

Warning: include(http://www.linux-faqs.com/HOWTO/footer.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 215

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/footer.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/BTI-PPP/x374.php on line 215