Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Bash by sdf ( 13 years ago )
#[Interfaces]
#-----------------

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
#
#iface lo inet loopback
auto eth1
iface eth1 inet static
address 10.8.1.20
netmask 255.0.0.0
network 10.8.1.0
broadcast 10.8.1.255
gateway 10.8.1.1


## dhcpd.conf###############
#----------------------------
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option routers 192.168.2.1;
option domain-name-servers  208.67.222.222, 208.67.220.220
option domain-name "mydomain.example";

subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.150 192.168.2.200;
}


## IP TABLES ---------------------

iptables --flush 
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
#echo 1 > /proc/sys/net/ipv4/ip_forward
iptables-save

# transparent squad proxy server configuration
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.1:3128
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables-save

 

Revise this Paste

Children: 35273
Your Name: Code Language: