On the Net

|Main Blog|Yearning|  

Words of God


About Linux News and OpenSource

How to Install and Use Windows Applications on Linux using PlayOnLinux
Thursday, January 31, 2019

In this article, we will explain how to install PlayOnLinux on your Ubuntu both through the command line and the graphical user interface. More importantly, we will explain how to install a Windows application, Notepad Plus Plus in our example, by using PlayOnLinux. .. read more..

How To Add The BlackArch Pentesting Repository To Arch Linux
Thursday, January 31, 2019

BlackArch is a penetration testing distribution, similar to Kali Linux, but it’s built on top of Arch Linux. In reality, BlackArch is really a pre-configured Arch installation with an extra repository full of security tools. As a result, you can add the BlackArch repository to a regular install o... .. read more..

WINE 4.0, LXQt 0.14, Parrot OS, Mastodon, MythTV, Gitea, APT Vulnerability | ...
Thursday, January 31, 2019

also on TWinL52: Lubuntu Council Announced, Manjaro Stable Update Breakage, Multipass, gotop, TuxClocker, Dell's XPS 13 9380, Ad Blocker Breakage in Chrome Extension Manifest V3, Humble Bundles .. read more..

Free Drawing And Painting Program MyPaint 2.0.0 Alpha Released
Thursday, January 31, 2019

After being in development for more than 2 years, MyPaint 2.0.0 alpha is available for download. MyPaint is a free, open source drawing and painting program available for Windows, macOS, and Linux. The application features infinite canvas, configurable brushes, graphics tablet support, and a dist... .. read more..

Ubuntu 18.04 needs patching
Thursday, January 31, 2019

Canonical is updating Ubuntu 18.04 to the 4.15.0-44.47 Linux kernel to fix several security bugs. .. read more..




and below are my posts....


Wednesday, November 30, 2005

Using LINUX as NAT gateway

Share your internet connection in your LAN by using Linux and IPTABLES. First, create a script and put it in your /etc/rc.d/ then name it gateway.sh like below..

root@localhost#vi /etc/rc.d/gateway.sh

then enter the following:
#!/bin/sh
echo “1″ > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

where eth1 is your interface connected to internet and eth0 is the interface connected to LAN. Then the ip address of your eth0 should be the ip gateway of the hosts connected to your LAN.

After you made that little script, put that in your rc.local file so it will run everytime the pc starts-up. Do it like this:

root@localhost#vi /etc/rc.d/rc.local

#at the end of all the script, enter the ff. line
/etc/rc.d/gateway.sh

then save it

Opps, we have not yet made that gateway.sh executable, so to make it, do it like this:
root@localhost#chmod +x /etc/rc.d/gateway.sh

now you can run that script or when you restart, it will just start.

0 Comments:

Post a Comment

<< Home