LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2009, 04:48 AM   #1
JHMorris
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Squid stops working after subnet mask change


Due to a lack of IP address I am changing our subnet mask from 192.168.0.0/24 to 192.168.0.0/22. We use IP address 192.168.0.4 as our squid server and I am trying to change the subnet mask so that workstations with addresses 192.168.1.x - 192.168.3.x will be able to use squid as the proxy server.

I am new to Linux but so far I have edited the squid.conf and changed 2 lines to read

acl myIP src 192.168.0.4/255.255.252.0
acl myIP src 192.168.0.0/255.255.252.0

I now need to change the subnet mask for the Linux server. I have run the command 'ifconfig -a' and received the following

eth0 - inet addr:192.168.0.4 Bcast:192.168.0.255 Mask:255.255.255.0

I then ran the command 'ifconfig eth0 netmask 255.255.252.0'

When I check the config again the new mask is displayed but nothing can use the squid server. Further more if I run 'ifdown eth0' and then 'ifup eth0' the mask reverts back to 255.255.255.0 (but at least the workstations's can use squid again).

1. Do I need to save it (similar to wr mem with a cisco box)
2. Do I need to change the BCast (assuming 192.168.3.255 as this will be the end of the /22 range).
3. Is there something else I need to configure?

I am using Red Hat (unsure which build - is there an easy way to find out)

Thanks

JHM
 
Old 01-21-2009, 04:56 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
did you changed the netmask on all the computers, or in the DHCP server if any?
 
Old 01-21-2009, 05:47 AM   #3
JHMorris
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Repo,

Thanks for the quick response.

I haven't changed the DHCP range yet until I get the proxy working. I have changed the netmask on servers and the firewall but they are still all on 192.168.0.x anyway so chaging the netmask on the proxy to /22 should have no effect.

Having said that I just run 'shutdown -r now' and a test machine with ip address 192.168.1.x can now access the internet via the proxy so I am guessing that changing this config:-

acl myIP src 192.168.0.4/255.255.252.0
acl myIP src 192.168.0.0/255.255.252.0

followed by the shutdown appears to have worked.

I may try to chage the netmask also of eth0 but if this works I may well leave it. Do you think I need to shutdown and restart after making the changes? Also, are the changes permanent or do they need to be written?

JHM

Last edited by JHMorris; 01-21-2009 at 05:49 AM.
 
Old 01-21-2009, 06:05 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Do you think I need to shutdown and restart after making the changes?
Restart networking, should be OK
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redhat Centos 5.2 - How to change subnet mask rust8y Linux - Networking 1 11-26-2008 05:20 PM
Subnet Mask with 1 IP. Ionized Linux - Networking 25 06-10-2007 12:20 AM
SUSE Ent 9 New Subnet Mask Setting Not Working kevingbender Linux - Networking 0 03-09-2007 10:06 AM
Subnet Mask jomyjose Linux - Networking 2 08-01-2006 09:19 AM
subnet mask kizersouzay Linux - Networking 1 08-31-2005 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration