November 21, 2024, 04:37:41 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: network connection problem  (Read 13858 times)

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« on: March 29, 2007, 10:12:12 AM »
Dear all ,

just install a squid and need to enroll at my network. But i am not sure how to ... -_-

i'd try like this :

Wan ( Modem ) -- > 192.168.1.100/ 255.255.255.0/192.168.1.1( Eth0 ) - 192.168.1.101/255.255.255.0 / 192.168.1.100 ( Eth1 ) ( same PC , 101 is proxy connection ) -- > Router( 192.168.1.1 ) --> user PC ( 192.168.1.10 / 255.255.255.0 / 192.168.1.1 ).

seems like i have missing some config on routing 192.168.1.101 to 192.168.1.100 for the internet connnection , or i put the wrong place on the Proxy ???
 Please kindly help a hand . Regards

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
network connection problem
« Reply #1 on: March 30, 2007, 10:30:05 PM »
Its fine but I don't understand that why you are using two ips for single interface ??
eg. for eth0
192.168.1.100/ 255.255.255.0/192.168.1.1( Eth0 )

Why two ?
Untill u can ping proxy running machine from client  you can use proxy server on that client. (if you are running simple proxy.)

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
Re : anout setting
« Reply #2 on: April 02, 2007, 03:33:43 AM »
Dear Ricky ,

thank you for your reply .

For the proxy setting , i am reading form some manual , which was teach for using 2 LAN card , 1 for intranet and 1 for internet , place the proxy between ADSL Modem and router .... so i use the setting as description. I am using simple proxy , for blocking MSN / IM connection on my enviorment .. Please kindly advise .

Regards / Damien

Quote from: "Ricky"
Its fine but I don't understand that why you are using two ips for single interface ??
eg. for eth0
192.168.1.100/ 255.255.255.0/192.168.1.1( Eth0 )

Why two ?
Untill u can ping proxy running machine from client  you can use proxy server on that client. (if you are running simple proxy.)

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
network connection problem
« Reply #3 on: April 02, 2007, 09:08:10 AM »
Can you explain .. that what does this mean ?
Code: [Select]
192.168.1.100/ 255.255.255.0/192.168.1.1

First is your ip then subnet and what is this third ip about ?

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« Reply #4 on: April 02, 2007, 10:17:13 AM »
Dear Ricky ,

Ip / Subnet Mask / Default Gateway


should i change the ip 192.168.1.100 to the ip subnet of ISP provided ?? THey Provide X.Y.Z.94 / 255.255.255.252 / X.Y.Z.93

FYI

Regards / Damien..


Quote from: "Ricky"
Can you explain .. that what does this mean ?
Code: [Select]
192.168.1.100/ 255.255.255.0/192.168.1.1

First is your ip then subnet and what is this third ip about ?

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« Reply #5 on: April 03, 2007, 09:01:03 AM »
Hi everybody ,

Will anyone have comment to me ???

Thank you very much

Regards / Damien

Quote from: "damien"
Dear Ricky ,

Ip / Subnet Mask / Default Gateway


should i change the ip 192.168.1.100 to the ip subnet of ISP provided ?? THey Provide X.Y.Z.94 / 255.255.255.252 / X.Y.Z.93

FYI

Regards / Damien..


Quote from: "Ricky"
Can you explain .. that what does this mean ?
Code: [Select]
192.168.1.100/ 255.255.255.0/192.168.1.1

First is your ip then subnet and what is this third ip about ?

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
network connection problem
« Reply #6 on: April 03, 2007, 06:43:27 PM »
hmm,...

Ok now understood.. I think now I can help you clearly (earlier I was thinking that gateway ip as an alias)

So your config is :

(Server)
WAN (eth0 ) : IP: 192.168.1.100/ 255.255.255.0/
Gateway:192.168.1.1

Local LAN: IP 192.168.1.101/255.255.255.0
Gateway:192.168.1.100

Router :192.168.1.1
User PC: 192.168.1.10 / 255.255.255.0  
Gateway: 192.168.1.1

Considering above setup:::
First of all, if your WAN is connected to Server to directly ie. the machine where you have two NICs then on eth0 you have to use IP / subnet / Gateway provided by your ISP.

Here I see that you are actually using your router as Gateway IP.

For eth1 (on server) you can use any ip but do not use any gateway on it if eth0 on that machine is directly connected to WAN

for Local machine ie. client use any any ip of same network of eth1 of server ie. if you can ping server from client then you can use Proxy server running on it.

Lastly.. can you surf internet on SERVER itself ?

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« Reply #7 on: April 03, 2007, 07:24:15 PM »
Hi Ricky ,

sorry for my bad description.

Umm - about the server , i need to try one more time , and i will reply the resule on the later coming hours ( which now is 3: 40 AM Morning ... ) acutally , thank you for your fast reply .. ^^

Reagrds / Damien

Quote from: "Ricky"
hmm,...

Ok now understood.. I think now I can help you clearly (earlier I was thinking that gateway ip as an alias)

So your config is :

(Server)
WAN (eth0 ) : IP: 192.168.1.100/ 255.255.255.0/
Gateway:192.168.1.1

Local LAN: IP 192.168.1.101/255.255.255.0
Gateway:192.168.1.100

Router :192.168.1.1
User PC: 192.168.1.10 / 255.255.255.0  
Gateway: 192.168.1.1

Considering above setup:::
First of all, if your WAN is connected to Server to directly ie. the machine where you have two NICs then on eth0 you have to use IP / subnet / Gateway provided by your ISP.

Here I see that you are actually using your router as Gateway IP.

For eth1 (on server) you can use any ip but do not use any gateway on it if eth0 on that machine is directly connected to WAN

for Local machine ie. client use any any ip of same network of eth1 of server ie. if you can ping server from client then you can use Proxy server running on it.

Lastly.. can you surf internet on SERVER itself ?

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« Reply #8 on: April 04, 2007, 11:03:00 AM »
Hi Ricky / Dear all ,

Tested with bad luck .....

All PC ( include server ) can not connect to internet. I was resumed normal . Please advise for any more update ...

THank you very much

Regards / Damien

Quote from: "damien"
Hi Ricky ,

sorry for my bad description.

Umm - about the server , i need to try one more time , and i will reply the resule on the later coming hours ( which now is 3: 40 AM Morning ... ) acutally , thank you for your fast reply .. ^^

Reagrds / Damien

Quote from: "Ricky"
hmm,...

Ok now understood.. I think now I can help you clearly (earlier I was thinking that gateway ip as an alias)

So your config is :

(Server)
WAN (eth0 ) : IP: 192.168.1.100/ 255.255.255.0/
Gateway:192.168.1.1

Local LAN: IP 192.168.1.101/255.255.255.0
Gateway:192.168.1.100

Router :192.168.1.1
User PC: 192.168.1.10 / 255.255.255.0  
Gateway: 192.168.1.1

Considering above setup:::
First of all, if your WAN is connected to Server to directly ie. the machine where you have two NICs then on eth0 you have to use IP / subnet / Gateway provided by your ISP.

Here I see that you are actually using your router as Gateway IP.

For eth1 (on server) you can use any ip but do not use any gateway on it if eth0 on that machine is directly connected to WAN

for Local machine ie. client use any any ip of same network of eth1 of server ie. if you can ping server from client then you can use Proxy server running on it.

Lastly.. can you surf internet on SERVER itself ?

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
network connection problem
« Reply #9 on: April 04, 2007, 11:35:08 AM »
Can you tell me that where your WAN is connected.. is it connect to router ?

Also tell me what type of internet sharing you are using at the moment ?

Offline damien

  • Linux Noob !
  • *
  • Posts: 9
network connection problem
« Reply #10 on: April 04, 2007, 04:34:39 PM »
Hi RIcky,

simple description:

Wan side ( internet ) --> Modem ( Provide by ISP ) --> Linusx squid proxy ,  eth 0 192.168.1.100 / 255.255.255.0 / 192.168.1.1 ( Lan Cable Connect to Modem ), eth1 ( 192.168.1.101/ 255.255.255.0 / 192.168.1.100 , Lan Cable connect to Router ) --> Router 192.168.1.1 / 255.255.255.0 / X.Y.Z.93 ( Gateway provide by ISP )  --> HUB for User PC 192.168.1.x / 255.255.255.0 / 192.168.1.1 . Even i chenge user PC default gateway from 192.168.1.1 to 192.168.1.100 ..... NO ANY SETTING OF INTERNET SHARING ..... i thing i had something misunderstanding from manuals . please advise

Regards Damien

Quote from: "Ricky"
Can you tell me that where your WAN is connected.. is it connect to router ?

Also tell me what type of internet sharing you are using at the moment ?

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
network connection problem
« Reply #11 on: April 07, 2007, 07:35:54 AM »
OK . now I understood your network scenerio..

You are using your Router as NAT server to every client.. and for router.. Linux box is bridge to your ISP.

You install proxy on your linux box.. add you LAN network range in allowed network list then configure your client's browser to use Proxy server as : 192.168.1.101
Port : 3128 (or whichever you specify in your config)

Thats simple proxy and should work.

Offline nmmurali

  • Linux Noob !
  • *
  • Posts: 7
Re: network connection problem
« Reply #12 on: May 24, 2010, 01:31:32 PM »
Hi Friend,

Your router is using only for NAT just remove it and configure like this

Isp Modem--> Proxy Server (it work as a router)--> Sitch/Hub

I think proxy server having two network cards. So eth0 is connect to modem and eht1 is connect to switch/hub

First configure modem
Modem IP : 192.168.1.1 Subnet 255.255.255.0

proxy server configuration:

eth0 : 192.168.1.2 / 255.255.255.0 / 192.168.1.1 (connect to modem)

eth1 : 192.168.2.1 / 255.255.255.0 / 192.168.1.2 (connect to switch/hub)

In this case client ip's is : 192.168.2.3 to 192.168.2.254

open squid configuration file

# vim /etc/squid/squid.conf

#acl (in access control place configure like this)

acl local_network src 192.168.2.0/255.255.255.0
http_access allow local_network


Then find http_port 3128  line in squid config file bellow this lien add
http_port 192.168.2.0:3128

then restart the squid services like

#/etc/init.d/squid restart


finally give this command in terminal window

#iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

#iptables --append FORWARD --in-interface eth1 -j ACCEPT

Example Client address

IP : 192.168.2.4
Subnet : 255.255.255.0
Gateway: 192.168.2.1

Still you are not getting internet just configure client browser

open internet explorer  Tools  Internet setting Connections

select proxy settings give the ip 192.168.2.1 Port number 3128 click ok then enjoy internet

*************************************************

In this configuration you are getting any error please post i will give the reply