[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1002
  • Last Modified:

INTERNET CONNECTION SHARING TO LAN and LIMITING THE BANDWIDTH to each LAN PC.

Hi,

does anyone know how to ENABLE INTERNET CONNECTION SHARING TO LAN and LIMITING THE BANDWIDTH to each LAN PC.

the OS is LINUX IPCOP 1.4

Thanks
0
abangbatax
Asked:
abangbatax
  • 5
  • 4
  • 3
  • +2
2 Solutions
 
shoaibbhatti007Commented:
Best Way for Internet Sharing with Bandwidth Limiting is: SQUID with Delay Pool
http://www.linuxhomenetworking.com
for other traffic (except www & ftp etc) use IPTABLES, also mentioned in the above site
0
 
BlazCommented:
I believe that hard bandwidth managent based on LAN station IDs is not simple. You should write rules for every station...

http://linux-ip.net/articles/Traffic-Control-HOWTO/rules.html#r-sharing-ips

If there is only web traffic proxy really is the way to go.
http://www.faqs.org/docs/Linux-HOWTO/Bandwidth-Limiting-HOWTO.html
0
 
abangbataxAuthor Commented:
above solutions are more to limiting bandwidth
how about enable internet sharing for LAN from a pc that connected to internet
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BlazCommented:
IPcop is a firewall. You should connect the internet line to RED interface and LAN PCs to GREEN interface and that's it.
http://www.ipcop.org/1.4.0/en/install/html/decide-configuration.html

You of course need at least two network interfaces for that
0
 
shoaibbhatti007Commented:
NOP..You can share Internet on some LINUX Server/PC with IPTABLES with NAT and for www/ftp traffic use SQUID.
If you use XP/Windows 2003, use its ICS (Internet Conenction Share) for Internet Sharing to Other PC/Laptops with One or More LAN Cards in XP/Windows 2003
0
 
abangbataxAuthor Commented:
Blaz:

I have done what your solution is but LAN still not connected to internet
another thing is RED is not connected to INTERNET either

is there anything i setup wrong?
0
 
BlazCommented:
Which interface is connected to the internet then?

RED interface should be connected to the internet, GREEN to local LAN network - that is how it is supposed to be setup.

Perhaps it is best that you go through the installation step by step:
http://www.ipcop.org/1.4.0/en/install/html/

0
 
abangbataxAuthor Commented:
Yes, RED is conencted to Internet
Green is to LAN

i think the gateway for the RED is not setup using the step above link u gave

how to set manually the gateway?

thanks
0
 
BlazCommented:
For configuration you also have:
http://www.ipcop.org/1.4.0/en/admin/html/

Does internet access work on the IPCop machine itself? If it does the gateway is configured correctly.

BTW: What kind of internet connection do you have?

I think that you really should check the IPCop website for manuals and FAQs so you will have a better understanding of what you are doing...
0
 
abangbataxAuthor Commented:
the internet doesn't work on the IPCop it self
my internet connection using broadband connection
0
 
shoaibbhatti007Commented:
I am writing in detail(run commands with " sign # " :
  stop iptable service:
# service iptables stop
# echo 1 > /proc/sys/net/ipv4/ip_forward

    Whatever LAN interface ,first rule is redirect http traffic to 3128, this is SQUID port
#  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
    172.16.1.0/24 is the subnet to NAT
# iptables -A POSTROUTING -p tcp -m tcp -s 172.16.1.0/24 --dport 81:65535 -j MASQUERADE
# iptables -A POSTROUTING -p udp -m udp -s 172.16.1.0/24 --dport 81:65535 -j MASQUERADE
# iptables -A POSTROUTING -p tcp -m tcp -s 172.16.1.0/24 --dport 25 -j MASQUERADE
# iptables -A POSTROUTING -p tcp -m tcp -s 172.16.1.0/24 --dport 21 -j MASQUERADE
# iptables -A POSTROUTING -p tcp -m tcp -s 172.16.1.0/24 --dport 20 -j MASQUERADE
# iptables -A POSTROUTING -p udp -m udp -s 172.16.1.0/24 --dport 21 -j MASQUERADE
# iptables -A POSTROUTING -p udp -m udp -s 172.16.1.0/24 --dport 20 -j MASQUERADE

# service iptables save
# service iptables start
# service iptables status

you can iptables scripts from: http://www.linuxguruz.com/iptables/
0
 
abangbataxAuthor Commented:
that is for what shoaibbhatti007?
0
 
BibliophageCommented:
It's not directly related, but the more recent Smoothwall versions  (http://www.smoothwall.org) have bandwidth tracking and additional restrictions.

0
 
NopiusCommented:
> the internet doesn't work on the IPCop it self
> my internet connection using broadband connection

To what device your IPCop connected with RED interface?
Do you have external IP address already or you should run PPPOE client for getting it?
Are you behind of some kind of router with NAT enabled? I mean your IPCop is connected to such router and have private IP address (like 192.168.x.x) on RED interface? If it is, your configuration is incorrect.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now