Create Simple PC Router With Debian Woody 4

I can be the task of the school's teachers pengampu me .. namely to create a PC using a Simple Static Router Linux Debian Woody 4. OK ... I work thus

1. Installing the Linux Operating System Debian Woody 4
2. Ip addressing
# nano / etc / network / interfaces
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 172.26.78.19
netmask 255,255,255,224
network 172.26.78.0
broadcast 172.26.78.31
gateway 172.26.78.1
# Dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 124.81.116.2
dns-search smartlinkgm.net


auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
broadcast 192.168.10.255
3. Setting Iptables
# iptables-A PREROUTING-t nat-j REDIRECT-p tcp-s 192.168.10.0/24-d 0 / 0 - DPort 80 - to-ports 8080 (when the existing squid)
# iptables-t nat-A POSTROUTING-o eth0-s 192.168.10.0/24-j Masquerade (there is no squid)
# iptables-t nat-A POSTROUTING-o eth0-s 192.168.10.0/24-j Masquerade
# iptables-save> / etc / iptables.conf
# echo "iptables-restore > / etc / network / if-up.d / iptables
# chmod 755 / etc / network / if-up.d / iptables
4. Setting ip forward
# nano / etc / sysctl.conf
net.ipv4.conf.default.rp_filter = 1
net.ipv4.ip_forward = 1
net.ipv4.conf.default.forwarding = 1
net.ipv6.conf.default.forwarding = 1
# sysctl-p / etc / sysctl.conf-A (to restart ip forward)
# sysctl-a | grep forward
5. Setting Squid
# apt-get install squid
after that configure the
# nano / etc / squid / squid.conf
in which, among other konfigure
http_port 3128 transparent
our_networks 192.168.10.0/24 (adjusted with our network)
# / usr / sbin / squid-k reconfigure (restart squid)
testing for squid
# tail-f / var / log / squid / access.log
6. restart
# / Etc / init.d / networking restart
Reconfiguring network interfaces ... done.
Be Ok a simple PC Router, such as the above configuration is quite safe and secure ..
Additional router can also be over in a forward proxy ... With little change in the script,..

0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates kinosti by My Blog 2009

Back to TOP