Hello,
I use a CentOS desktop machine with BSNL (DataOne) to access Internet.
I am trying to set up a LAN in my home so that I can access Internet
from my Laptop which runs on Ubuntu 8.10.
__________________
__________________
| |
| |
---------------|192.168.1.30 |
| |
Internet | eth0 | LAN
| |
| 192.52.1.1
|------------------------------ | 192.52.1.2 |
| | eth1
| |
--------------------------------
--------------------------------
CentOS 5.1
Ubuntu 8.10
As you see, my CentOS machine has got two network cards: eth1 is
connected to LAN and eth0 is connected to Internet. I use PPPoE to up
the Internet. Below is the ifconfig output of the CentOS machine:
[sa...@serein ~]$ /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1C:C0:51:E9:3B
inet addr:192.168.1.30 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c0ff:fe51:e93b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:97415 errors:0 dropped:0 overruns:0 frame:0
TX packets:105257 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68026639 (64.8 MiB) TX bytes:21338514 (20.3 MiB)
Interrupt:177 Base address:0xe000
eth1 Link encap:Ethernet HWaddr 00:21:91:7A:30:92
inet addr:192.52.1.1 Bcast:192.52.1.255 Mask:255.255.255.0
inet6 addr: fe80::221:91ff:fe7a:3092/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:555 errors:0 dropped:0 overruns:0 frame:0
TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120632 (117.8 KiB) TX bytes:25261 (24.6 KiB)
Interrupt:50 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:235160 errors:0 dropped:0 overruns:0 frame:0
TX packets:235160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:69406123 (66.1 MiB) TX bytes:69406123 (66.1 MiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:117.194.193.143 P-t-P:117.194.192.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 Metric:1
RX packets:95264 errors:0 dropped:0 overruns:0 frame:0
TX packets:103125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:65790738 (62.7 MiB) TX bytes:19004078 (18.1 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
>From the various resources available in the Internet, I tried to
enable masquerading:
[r...@serein ~]# /sbin/iptables -A FORWARD -i eth1 -o eth0 -m state
--state RELATED,ESTABLISHED -j ACCEPT
[r...@serein ~]# /sbin/iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
[r...@serein ~]# /sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
[r...@serein ~]# service iptables save
[r...@serein ~]# service iptables restart
But even then, I am not able to ping any outside ip from my laptop. I
can connect to my desktop but not beyond it :( Am I missing something?
FYI, I have regular Redhat Firewall enabled in my CentOS machine. Not
sure if that is creating any problem. Please help.
Thanks in advance,
--
S.
Argue with idiots, and you become an idiot. - PG
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc