Hi all,
I'm a bit confused, my home network is divided into two subnets: 192.168.100.0 and 192.168.1.0.
I've configured my Linux server to act as a router.
IP forwarding is on:
Code:
cat /proc/sys/net/ipv4/ip_forward
1
The 192.168.1.0 network is able to access the internet, but the 192.168.100.0 network is not.
However, from a pc with IP address 192.168.100.21 i can ping the web interface of my local ISP router (192.168.1.1), so I guess the routing is setup correctly...
Here is my routing table:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
and my interface config:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
eth1 doesn't have a gateway set, is that correct?
Some people advise me to use NAT, but 192.168.100.0 and 192.168.1.0 are both internal networks, so I don't think NAT is needed... or does it?
Should I consider using masquerading instead? As I said, I'm a bit confused...
I do find it very strange that i.e. IP address 192.168.1.21 CAN access the internet, but IP address 192.168.100.21 CANNOT... while they can ping each other...
What am I doing wrong of what do I misunderstand about NAT?
Thanks!!