A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

November 15, 2010

How do I get the internet to work in this setup?

DSL Modem <--> Wireless router <--> ServerA <--> Workstations

Wireless router (192.168.0.1)
ServerA (10.0.255.250) = Default Gateway to Workstations (or DHCP scope; dhcpd.conf)

ServerA has eth0 and eth1; eth0 goes to the wireless router, and eth1 connects to the HP switch (all workstations connect to this).

ServerA runs Squid.

Here is ServerA's /etc/network/interfaces

# -------------------------------
auto lo
iface lo inet loopback

# -------------------------------
auto eth0
iface eth0 inet static
address 192.168.0.199
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.1
gateway 192.168.0.1
post-down ip addr flush dev eth0

# --------------------------------
auto eth1
iface eth1 inet static
address 10.0.255.250
network 10.0.0.0
netmask 255.255.0.0
broadcast 10.0.255.255

Previously I had been using a static internet IP for eth0, but then I moved this server behind a router (as well as another server that had a static internet IP).

Through wireless (direct to 192.168.0.1), I can surf the internet.
But when I try to surf the internet through ServerA, I cannot get a page, nor can I ping a website from ServerA through shell.

NOTE: I will worry about changing the DHCP scope later. Right now, experience and stuff in scenarios like this are good. :) Later I will want to make our new pfSense server take over as DHCP scope (or whatever).

Click Here!