[CentOS] Attaching LinkSys WRT54GL to CentOS machine

Sun Apr 24 23:31:58 UTC 2011
Ljubomir Ljubojevic <office at plnet.rs>

Timothy Murphy wrote:

> I don't actually think my motives are relevant.
> In case I didn't described the situation clearly,
> my CentOS server is connected to an ADSL modem by ethernet (eth0).
> The modem's IP address is .
It is very much relevant. I am in WISP business for last 7 years and 
there are several options.

Since you want your CentOS box to act as Router/Firewall/NAT(Otherwise 
you need to route inside your network)/DHCP server, first setup Linksys 
router (look below).

Then connect CentOS box Internal NIC to one of the Internal/Local/LAN 
ports on Linksys and configure that CentOS internal NIC on the same subnet.

Once that is finished, connect via other LAN ports on Linksys or via 
wireless (IP must be on the same subnet as Linksys new IP and CentOS 
internal NIC) and try pinging CentOS Internal IP.

When successful, run "echo 1 > /proc/sys/net/ipv4/ip_forward" to enable 
port forwarding and setup NAT/Masquerade to avoid seting up routing 
between subnets. You should be able to ping to outside from entire 
internal network.

Setup DHCP server on CentOS box and caching DNS server if you need it, 
or use and as DNSservers.

I recommend webmin and shorewall for easier setup (both exist as rpm's), 
and even maybe ClearOS instead of CentOS. Google it, you will find it.

> The reason, roughly speaking, is that I want all data
> that comes into or out of my system to go through the server,
> where the traffic can be followed and monitored if necessary.

> Do you have a LinkSys router with an IP address other than ,
> or even better with an address other than 192.168.1.* ?
> If you have, could you tell me _how_ you did it, please.
> I don't really care _why_ you did it.
setup Linksys by going to in your browser (set IP on 
the PC you are accessing from to fro example) and find "LAN 
settings" or "TCP/IP" or similar, and change "" to desired 
IP. Since It will act as simple AP/Bridge, default gateway is irrelevant.