1.ip address add address=192.168.1.20/24 broadcast=192.168.1.255 interface ether1 ( WAN )
2.ip address add address=172.16.1.100/24 broadcast=172.16.1.255 interface ether2 ( Public )
DOMAIN NAME RESOULATION
3.ip dns set primary-dns=192.168.1.1 allow-remote-requests=yes
Create IP Pool for DHCP SERVER
4.ip pool add name=DHCP ranges=192.168.0.10-192.168.0.255
ENABLE DHCP SERVER AND GIVE IT IP POOL NAME (DHCP)
5.ip dhcp-server add name=DHCP-Main add-arp=yes disabled=no interface ether2 address-pool=DHCP
Create ip pool for pppoe server
6.ip pool add name=pppoe-pool ranges=172.0.0.0/24
Enable pppoe server
7.interface pppoe-server server add interface=ether2 max-mtu=1488 max-mru=1488 keepalive-timeout=disabled one-session-per-host=yes max-sessions=0 default-profile=default authentication=pap disabled=no
Create ppp profile for make a users
8.ppp profile add name=pppoe-profile local-address=10.10.10.1 remote-address=pppoe-pool dns-server=10.10.10.1 rate-limit=512k/512k
Create firewall
9.ip firewall nat add chain=srcnat action=masquerade
Create ip route and gateway
10.ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1
Create user and give profile
11.ppp secret add name=test password=test profile=pppoe-profile
/ ip firewall nat
add chain=dstnat dst-port=80 protocol=tcp action=redirect to-ports=3128 comment=“PROXY REDIRECTION” disabled=no
/ ip web-proxy
set enabled=yes src-address=0.0.0.0 port=3128 hostname=“proxy” transparent-proxy=yes parent-proxy=0.0.0.0:0 cache-administrator=“webmaster” max-object-size=4096KiB cache-drive=system max-cache-size=380000KiB max-ram-cache-size=64000KiB