Hello,
The following will explain how to share your Internet connection:
Note: Type all the following commands in a root terminal, DO NOT use sudo.
1. Start by configuring the network card that interfaces to the other computers on you network:
# ifconfig ethX ip
where ethX is the network card and ip is your desired server ip address (Usually 192.168.0.1 is used)
2. Then configure the NAT as follows:
# iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
where ethX is the network card that the Internet is coming from
# echo 1 > /proc/sys/net/ipv4/ip_forward
3. Install dnsmasq and ipmasq using apt-get:
# apt-get install dnsmasq ipmasq
4. Restart dnsmasq:
# /etc/init.d/dnsmasq restart
5. Reconfigure ipmasq to start after networking has been started:
# dpkg-reconfigure ipmasq
6. Repeat steps 1 and 2.
7. Add the line "net.ipv4.ip_forward = 1" to /etc/sysctl.conf
# gedit /etc/sysctl.conf
8. Reboot. (Optional)
I hope this helps.
Good luck!
This entry was posted
on Saturday, April 28, 2007
and is filed under
Linux
.
You can leave a response
and follow any responses to this entry through the
Subscribe to:
Post Comments (Atom)
.
Archives
-
►
09
(1)
- ► March 2009 (1)
-
▼
07
(87)
- ► October 2007 (8)
- ► September 2007 (3)
- ► August 2007 (2)
-
▼
April 2007
(23)
- mermaid song 芝华士广告歌曲
- 无聊ing...
- Howto Install 32 bit Firefox with Flash w/sound an...
- HOWTO: Cleaning up all those unnecessary junk file...
- HOWTO: Change Font Color in Gnome Panels
- How to install Grub from a live Ubuntu cd.
- 论坛里还有这个东西
- HOWTO: Install AVG free anti-virus
- Howto Share internet connection
- How To Install Enlightenment E17 Using The Elbuntu...
- Enabling Multimedia in Feisty (HOW-TO)
- 新华网北京4月24日电
- Blogspot今天突然醒来了,不过已经没有以前的那种激动了。
- 魔兽争霸中所有英雄说的话
- 【转】让男生成熟的十部电影
- 单身男人99条警句!
- 这个blog的名字似乎要改一下了,只是不知道改成什么比较好。MaievShadowsong毕竟不是我...
- 觉得有些事情是不好大声说出来的,尤其是感情方面,说出来就是沉甸甸的责任。
- 昨天似乎比较幸运啊,抽到一道那么简单的题,不过如果搞砸了的话就真的糗大了。昨天收到的短信比较奇怪啊,...
- 今天早上又逃课了,其实我也不想,只是醒来的时候已经有点晚了,可恶的学校,刷牙洗脸还要排队,而我最恶心...
- 玩了一年半的魔兽RPG地图
- Happy April Fool's Day!
- 滕州话精选,你能看懂么? “钢铁子吃过吗 ” “我不带吃缸贴子,我光带吃粘拧卷大琼 ” “都佛的...
- ► March 2007 (10)
- ► February 2007 (2)
- ► January 2007 (10)
-
►
06
(22)
- ► December 2006 (15)
- ► November 2006 (7)
0 comments