Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Crazy Squid Cashing Server Idea, Need Advice. Goto page 1, 2  Next
View previous topic :: View next topic  
Author Message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Sat Nov 30, 2013 11:08 am    Post subject: Crazy Squid Cashing Server Idea, Need Advice. Reply with quote

So here is what I want to do.
In my area there is only DSL, and the fastest you can get is 24mb down. They charge $20 + a lot of hidden fees, and the cost of the modem. Here was my brilliant idea.
Start with one modem and one connection, connect it directly to an sms server and set it up with squid, then use another Ethernet connection to connect to a DD-WRT WiFi Router to brodcast as a hotspot with a 1mb - 2mb cap per connection. Then rent out DD-WRT routers configured with the encryption to connect to my hotspot, and put them in bridge repeat mode so people can have their own hotspots to connect to at home, and plug into.
Then after I get 20+ people using the hotspot and paying me rent at like $10 a month for the DD-WRT repeaters, I want to have more Ethernet ports ready in the SMS server, that I can plug more modems into, and then the sms server can load ballance between the modems (have no idea how to do this) and all the caching would affect everyone's speed no matter what modem was used.
I wouldn't know what hardware would be best for this idea. I'm sure I'll be starting small. In the past I couldn't get my squid to use the amount of space on the HD in the server that I wanted. I used it with one modem, and it was a proxy. I don't want to have to configure every device to proxy threw it on lan, I want it to function like a router with it's own NAT, so for instance the modems would be 192.168.0.1 on their LAN side, and my SMS server would be 192.168.1.1 on it's LAN side, and on it's WAN sides it would be 192.168.0.2, 192.168.0.3, 192.168.0.4, (different IPs on each WAN to help identify what WAN each modem is connected to.
Then of course as I take over the world, I want to put a bunch of high speed repeater bridges around town, that re-transmit my Hotspot so I can spread it out. The town is only like 3 miles wide tops. This would be internet for low income families, good for school work and office work, maybe not as good for streaming, and uploading ? If I could cap each client though, it should work, and having a large cache shared between all the modems should really speed things up for people. People who are on Facebook for instance would see a real speed boost from the server sense the pictures and code on Facebook is the same for a lot of people in this area, that are friends. Linux PC package updates, Maybe Windows Updates...
If my HD was say 100 GBs, how much RAM would I need to utilize all of it for caching ? How fast must the CPU be ?

Thanks oh great masters of the sms servers.
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Sat Nov 30, 2013 11:12 am    Post subject: PS almost forgot. Reply with quote

Ya I want the routers, and the SMS server to block any porn sites, or illegal sites, that might get me in trouble if people access them.
I also made a duplicate post by mistake. Don't see a delete button Sad
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Dec 02, 2013 11:29 pm    Post subject: Reply with quote

Hi,
just setup an SMS server with transparent proxy squid configuration and dansguardian for content filtering and use 2 ethernet ports to create a router...
If you don't have an idea use smsconfig like "smsconfig router"

Load balance ain't difficult but I would suggest splitting customers to many different dsl lines and subnets to avoid downtimes...
Also you can increase security with a radius server to manage logins too...

As for the hardware the more ram you have the better and of course a good machine....
As the connections increase, load increase too...
As for the infrastructure you can have two or more machines later if you succeed...

You are not the first nor the last who thought over the idea, so I'll give you some ideas too...

Attracting individuals would be difficult, so I would suggest contacting the municipality and offer a contract to add managed wifi hotspots on public squares if they don't have any, or maybe coffee shops or any other place that people gather...

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Sun Dec 22, 2013 6:56 am    Post subject: Further Input Reply with quote

Thanks. Also I need to know how to make dam sure that when the power button is pressed, that the caching server, dansguardian, and router are started automatically. Somewhere you can put in custom commands and scripts for startup. In the past with sms I always had a problem getting squid to start automatically, and to get squid to use more than 20 MB of RAM. I also am going to have to find the default user and pass for webmin and the port address to use via the browser. I forgot.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sun Dec 22, 2013 2:11 pm    Post subject: Reply with quote

To make them start at boot type
Code:
smsconfig squid on
smsconfig dansguardian on


Default port of webmin is 10000 and default login is
admin:admin

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 10:46 am    Post subject: Issues so far. Reply with quote

I go to Bootup and Shutdown threw Webmin and paste this and click save:
Quote:
smsconfig squid on
smsconfig dansguardian on

Then I get this: Unsupported file or mode > sh /etc/rc.d/rc.local at init::/usr/local/webmin//init/save_local.cgi line 10

I go to Network Configuration, to try to set up a LAN port at eth1 but the eth0 is all that shows up. I'm not sure what I'm doing.

Ok, I tried what you said, and apparently the router is working, but now the system is as slow as molasses. I'm trying to figure out how to stop ClamAV from starting, when the thing turns on so that I have more system resources.
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 11:54 am    Post subject: Router. What Router ? Reply with quote

So I did the smsconfig router
and assigned eth0 as the WAN and that works.
I assigned eth1 as the LAN and that doesn't work at all.
I rebooted and did everything right.

Also no way to do transparent proxy for squid from webmin.

Also followed all your instructions I could find in the forums to chown -R nobody:nogroup /var/log/squid/cache
AND
user nobody
group nogroup

It won't initialize the cache, and says it hasn't.



smsnobodynogroup.png
 Description:
Shoot Self
 Filesize:  99.37 KB
 Viewed:  1639 Time(s)

smsnobodynogroup.png



SMSSquidCache.png
 Description:
BANG HEAD AGAIN
 Filesize:  78.65 KB
 Viewed:  1635 Time(s)

SMSSquidCache.png



smsrouter.png
 Description:
GRRRRR (Bang Head)
 Filesize:  138.5 KB
 Viewed:  1472 Time(s)

smsrouter.png


Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 12:18 pm    Post subject: Start Firewall At Boot Reply with quote

The Firewall running = working router.
This is what I get:
Quote:
Unsupported file or mode >sh /etc/rc.d/rc.local at WebminCore::../web-lib-funcs.pl line 3047

When I try to tell it to start at boot.
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 12:36 pm    Post subject: SSH Reply with quote

Ok, I edited the /etc/rc.d/rc.local file and added:

smsconfig squid on
smsconfig dansguardian on
smsconfig firewall on

At the bottom by hand and saved and exited.
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 1:28 pm    Post subject: lspci Reply with quote

root@sms:~# lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 620 Host (rev 02)
00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 IDE Controller (rev d0)
00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge) (rev b1)
00:01.1 Unassigned class [ff00]: Silicon Integrated Systems [SiS] ACPI
00:01.2 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 11)
00:02.0 PCI bridge: Silicon Integrated Systems [SiS] AGP Port (virtual PCI-to-PCI bridge)
00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
00:0d.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
00:0f.0 Multimedia audio controller: ESS Technology ES1969 Solo-1 Audiodrive (rev 01)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 530/620 PCI/AGP VGA Display Adapter (rev 2a)
root@sms:~#

root@sms:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::200:b4ff:fec3:a410 prefixlen 64 scopeid 0x20<link>
ether 00:00:b4:c3:a4:10 txqueuelen 1000 (Ethernet)
RX packets 5788 bytes 540318 (527.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5519 bytes 1557314 (1.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 11 base 0xd000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 1 bytes 218 (218.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 218 (218.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@sms:~# cat /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x1186:/sys/devices/pci0000:00/0000:00:0d.0 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0d:88:1d:21:bb", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:09.0 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:b4:c3:a4:10", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Fri Dec 27, 2013 5:42 pm    Post subject: Reply with quote

First of all delete all 3 lines from /etc/rc.d/rc.local...
smsconfig is for managing services so by stating "on" it will activate script to start at boot, no further action needed for squid, dansguardian...

To setup IP addresses edit /etc/rc.d/rc.inet1.conf accordingly...

For squid did you uncomment from /etc/squid/squid.conf ?
Code:
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/log/squid/cache/squid 100 16 256

and try
http_port 3128 transparent

To disable ClamAV use smsconfig like
to stop.
Code:
smsconfig av stop

to disable it at boot
Code:
smsconfig av off

Disabling ClamAV will affect mailserver, so either remove
smtpd_milters = unix:/var/run/clamav-milter/milter.sock
from /etc/postfix/main.cf
or disable the whole mailserver if you don't need it to save resources...
Another option is to switch to sendmail, although I don't think you need a mail server at all...

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 10:13 pm    Post subject: Reply with quote

gerasimos_h wrote:

To setup IP addresses edit /etc/rc.d/rc.inet1.conf accordingly...


# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]="192.168.1.1"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]="no"
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=BARRIER05
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=7B1ABEEB5D197741923ED26727569C365E31212096A0EAFAD563B268$
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name nstead of
# the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes" # If you don't want the DHCP server to change
# your default gateway
#DHCP_IPADDR[4]="" # Request a specific IP address from the DHCP
# server
#WLAN_ESSID[4]=DARKSTAR # Here, you can override _any_ parameter
# defined in rc.wireless.conf, by prepending
# 'WLAN_' to the parameter's name. Useful for
# those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=thekey TxRate=0"
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (space-separated, see the
# example).

I'm pretty sure I'm not doing this right. I just edited it for the first time today, and I know that's the IP eth1 should be putting out. Not sure what else to do.

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128 transparent

# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/log/squid/cache/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/log/squid/cache/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
cache_effective_user nobody
cache_effective_group nogroup

Followed all your instructions.
[/quote]
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 10:31 pm    Post subject: Reply with quote

/etc/webmin/firewall/iptables.save Is a blank file.
Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 10:40 pm    Post subject: Reply with quote

This is the screenshot of a Linksys Router who's WAN port is connected to eth1. As you can see it's not getting anything.

root@sms:~# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::200:b4ff:fec3:a410 prefixlen 64 scopeid 0x20<link>
ether 00:00:b4:c3:a4:10 txqueuelen 1000 (Ethernet)
RX packets 1376 bytes 139667 (136.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1348 bytes 398797 (389.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 11 base 0xd000

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20d:88ff:fe1d:21bb prefixlen 64 scopeid 0x20<link>
ether 00:0d:88:1d:21:bb txqueuelen 1000 (Ethernet)
RX packets 355 bytes 209450 (204.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 57 bytes 8561 (8.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 10 base 0xd400

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 76 bytes 11858 (11.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 76 bytes 11858 (11.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0



smseth1.png
 Description:
It is configed
 Filesize:  123.49 KB
 Viewed:  1586 Time(s)

smseth1.png



Eth1NotLAN.png
 Description:
 Filesize:  126.03 KB
 Viewed:  1685 Time(s)

Eth1NotLAN.png


Back to top
View user's profile Send private message
crazyideasguy
Member


Joined: 30 Nov 2013
Posts: 22
Location: United States

PostPosted: Fri Dec 27, 2013 11:03 pm    Post subject: I did some reading. Reply with quote

Actually a lot of reading.

I found that:
-rwxr-xr-x 1 root root 2684 Jun 27 2012 rc.ip_forward*
Needed to be executable. It wasn't. Grrrrrr.

Hope that fixes it.

http://book.huihoo.com/slackware-linux-basics/html/netconfig.html

Nope of course that didn't fix it Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional