2pfsense ساتھ BT انفینٹی SmartHub بدلنا

میں نے ایک سال پہلے ایک نئے گھر میں منتقل کر دیا جب میں نے آخر میں شامل ہونے کے قابل تھا 21st صدی اور ایک SmartHub کے ساتھ فراہم کی جاتی ہے جس میں بی ٹی انفینٹی حکم دیا. SmartHub دراصل معقول مہذب کٹ غور کر رہی ہے جو مفت کے لئے آتا ہے, لیکن سب سے زیادہ کے ساتھ کے طور پر آئی ایس پی سپلائی آلات جو کچھ طریقوں سے نیچے بند کر دیا ہے, for example you can­’t use your own DNS جن پر عمل کرنے کو ترجیح دیتے ہیں سرورز. ADSL کے ابتدائی دنوں میں (سرکا 2001) میں نے ایک روٹر کی جگہ میں ایک smoothwall باکس بھاگ گیا, اور وجوہات کی ایک رینج کے لئے (سمیت انٹرنیٹ فلٹرنگ میری طرف سے کنٹرول کیا, بجائے ایک آئی ایس پی) میں نے ایک لینکس پر مبنی فائروال روٹر پر واپس جانے کا فیصلہ.

The little Cel­er­on J1900 box I got to do the hard­ware side of things did­n’t want to install smooth­wall, تو میں بجائے pfsense نصب. میں نے بھی ایک VDSL حاصل تھا (فائبر) modem to con­nect the router to the phone sock­et. I got a net­gear DM200 which is actu­ally a full router that can be switched into “modem only” mode. Get­ting the whole arrange­ment work­ing took quite some fid­dling, so I thought I’d pull all the resources togeth­er in one place

1. نصب ہو pfsense

مجھے بذریعہ pfsense انسٹال کرنے کی ضرورت یوایسبی, so effect­ively by flash drive. This was made pos­sible by the use of a blank pen drive, soft­ware called rufus, and the ‘mem­stick’ down­load of pfsense.

2. NETGEAR DM200 تشکیل

To do any­thing with the DM200 you will have to con­nect both a LAN cable to it, and the phone sock­et to it. Your PC should get an address from the net­gear by DHCP but if it does­n’t you will need to manu­ally set you آئی پی 192.168.5.x کو خطاب (x being any­thing from 2 - 254). You can then log in via web inter­face at 192.168.5.1. The default login user­name is منتظم and the pass­word is pass­word. Select the “advanced” tab, and then the “advanced” menu option at the bot­tom left of that page. Under that select the “device mode” option. Change the device mode to “Modem (موڈیم صرف)” and click apply. You can see more details and screen­shots on the net­gear help pages

3. لاگ ان کریں اور ڈیفالٹ پاس ورڈ تبدیل

Con­nect your pfsense box to the lan and con­nect to it using web inter­face via it’s lan آئی پی ایڈریس (which it will dis­play on it’s default boot up screen if you con­nect a dis­play to it). You may have to change your loc­al آئی پی اس مقصد کو حاصل کرنے کے لئے سے نمٹنے کے. Login to the pfsense with the user­name منتظم and pass­word pfsense. Go through the setup wiz­ard and when giv­en the oppor­tun­ity change the default webui pass­word. For more detailed inform­a­tion on steps 1–3 I recom­mend a tecmint پر گائیڈ

4. pfsense باکس تشکیل ایک بنیادی کنکشن حاصل کرنے کے لئے

I use BT infin­ity and get­ting the right set­tings proved trick­i­er than I had hoped. I had to first con­fig­ure the وان set­tings cor­rectly and after that, set the cor­rect pro­file for the وان inter­face. پہلا, کے پاس جاؤ Inter­faces: وان اور مندرجہ ذیل مقرر.

IPv4 Con­fig­ur­a­tion Typeہے PPPoE
IPv6 Con­fig­ur­a­tion TypeDHCP6
Use IPv4 con­nectiv­ity as par­ent interfaceticked کی
درخواست صرف ایک IPv6 کی سابقہticked کی
DHCPv6 Pre­fix Del­eg­a­tion size56
user­namebthomehub@btbroadband.com
pass­wordکوئی بھی قدر کام کریں گے

تبدیلیوں کو محفوظ کریں, اور پھر میں جاتے ہیں Inter­faces: Assign­ment. مقرر وان inter­face to “PPPOE…” which after sav­ing should show with the phys­ic­al inter­face in brack­ets — in my case it says “PPPOE (em0)". Save the changes again and hope­fully you will get a connection.

4B. وان MTU ویلیو

میں وان Inter­face set­tings you might want to adjust your MTU set­ting to work optim­ally with BT Infin­ity to avoid frag­men­ted pack­ets and pos­sible pack­et loss. I have writ­ten a [int­link id=“4002” type=“post”]وقف مضمون[/intlink] اس مسئلے پر.

5. IPv6 کی ٹیسٹنگ

The set­tings above should be suf­fi­cient to get IPv6 work­ing on your LAN cli­ents — you should also see an IPv6 address for the pfsense LAN inter­face (یعنی. one that does­n’t start fe80). Try pinging google.com from a ter­min­al win­dow on a LAN cli­ent — if you get a response from the IPv6 address then all is well. You can also check that all i cor­rect using test-ipv6.com. کرنے کے لئے شکریہ Dan­neh for the set­tings. For more inform­a­tion I recom­mend this red­dit thread.

There is one fur­ther tweak required to make sure IPv6 works fully, you need to allow ICMPv6 pack­ets through the fire­wall. Go to Fire­wall, اور پھر رولز. ایک نیا اصول شامل کریں, set the address fam­ily to IPv6, change the pro­tocol to ICMP, leave “any” selec­ted as the sub­types (unless you want to do a lot more read­ing about spe­cif­ic sub­types). محفوظ کریں پر کلک, and then click “Apply Changes”.

6. کو چالو کرنے انٹیل بہتر رفتار قدمی

I don’t want my lower powered router run­ning at full tilt all the time — but sadly pfsense doens’t seem to cor­rectly sup­port intel enhanced speed step by default at the moment. To get mine work­ing (and a lower cpu tem­per­at­ure to go with it!) میں نے سب سے پہلے میں سے Powerd کو چالو کرنے کے لئے تھا Sys­tem -> اعلی درجے کی -> Mis­cel­laneous -> POWERD فعال. If you want to enable the low­est fre­quen­cies (ان altho زیادہ طاقت بچا نہیں کرتے) you will also need to do the fol­low­ing changes: کے پاس جاؤ Dia­gnostics, فائل میں ترمیم. اس کے بعد فائل کا پاتھ درج /بوٹ / device.hints. change the bot­tom 2 سے اندراجات 1 کرنے کے لئے 0 (کہا جاتا ہے hint.acpi_throttle.0.غیر فعال کر دیا and hint.p4tcc.0.غیر فعال کر دیا). کرنے کے لئے شکریہ SecondEdge and dreamslack­er ان تجاویز کے لئے. To check this is work­ing you will need to log into the router via SSH, منتخب آپشن 8 (شیل) اور چلانے کے sysctl dev.cpu. | grep کرنے Freq کا. This took my cpu core tem­per­at­ure from 66C to 57C — not bad for a tiny fan­less sys­tem packed in next to anoth­er PC, موڈیم, and an 8‑port switch.

7. پورٹ فارورڈنگ

کے پاس جاؤ fire­wall: NAT and then click the add but­ton. درج آئی پی address and port for the des­tin­a­tion and (سب سے زیادہ امکان) the same port for the extern­al port. For more detailed inform­a­tion I recom­mend splurben طرف ایک پوسٹ pfsense فورم پر.

8. NAT عکاسی

I use my laptop both at home on the LAN and away from home and in both cases want to access vari­ous web inter­faces on the LAN. I use DDNS to get a domain name and wanted to use this to con­nect even when con­nec­ted to the LAN. This requires NAT reflec­tion which can be enabled under sys­tem: اعلی درجے کی: NAT Reflec­tion mode for port for­wards. آپ کر سکتے ہیں (شاید) بھی چالو کرنے کی ضرورت ہے 2 oth­er options on this page: Enable NAT Reflec­tion for 1:1 NAT and Enable auto­mat­ic out­bound NAT for Reflection

9. Adblocking

All of my PC webbrowsers have adb­locked installed, but the same can­’t be said of my android devices as these have to be rooted to install block­ers. So being able to block ads with pfsense is one of the major advant­ages of using it. پہلا, کے پاس جاؤ sys­tem: pack­age man­ager اور اس کے بعد کے لئے تلاش pfb­lock­erng اور اسے نصب. You can then con­fig­ure it using Fire­wall: PFB­lock­erNG. میں نے اس وقت تک ہدایت نامہ کا استعمال کیا Fred­Merc to con­fig­ure it. A brief sum­mary of the set­tings I’ve used is as fol­lows. کے پاس جاؤ Fire­wall: PFB­lock­erNG اور پھر پر کلک کریں DNSBL ٹیب, اور پھر پر کلک کریں DNSBL EasyL­ist tab. Turn on the top EasyL­ist feed and point it to EasyL­ist. Then click the add but­ton, and set the second EasyL­ist feed to EasyP­ri­vacy and turn that on too. List action should be “unbound” and I set the update fre­quency to 1 دن. پھر محفوظ کلک. پھر جانا DNSBL ٹیب اور آپشن کو فعال DNSBL فعال. آخر میں جاتے ہیں Gen­er­al ٹیب اور enable pfB­lock­erNG.

9B. Adblock کے اصلاحات

The default PFB­lock­erNG con­fig­ur­a­tion causes prob­lems for the amazon android app. اس سے بچنے کیلئے, and oth­er issues, it is worth using some whitel­ist­ing. کے پاس جاؤ Fire­wall: PFB­lock­erNG اور پھر پر کلک کریں DNSBL ٹیب, کرنے کے لئے ذیل میں سکرال cus­tom domain whitel­ist and enter the fol­low­ing (کرنے کے لئے شکریہ bchow on the pfsense for­ums)

.amazonaws.com
.amazon-adsystem.com
.amazon.com
.ssl.google-analytics.com
.ssl-google-analytics.l.google.com # کے لئے CNAME (ssl.google-analytics.com)
.www.google-analytics.com
.www-google-analytics.l.google.com # کے لئے CNAME (www.google-analytics.com)
.www.googleadservices.com
.plex.tv
.gravatar.com
.thetvdb.com
.themoviedb.com
.googleapis.com # 172.217.3.202 is important for amazon app to work
.1e100.net # CNAME? altname? for googleapis.com
.ad.doubleclick.net # گٹوں کے تصادم کے لئے کی ضرورت?
.g.doubleclick.net # گٹوں کے تصادم کے لئے کی ضرورت?
.q1mediahydraplatform.com # hungryhouse لوڈ، اتارنا Android اے پی پی کے لئے کی ضرورت?

You may also want to enable the alexa whitel­ist of top sites.

10. شفاف سکویڈ پراکسی

I decided to set up a trans­par­ent squid proxy as much of the brows­ing that we do hits the same sites repeatedly on dif­fer­ent devices, I don’t expect it to make a huge dif­fer­ence, but I can­’t see any good reas­ons not to. استعمال sys­tem: pack­age man­ager سکویڈ نصب کرنے کے لئے. پھر میں جاتے ہیں خدمات: squid proxy serv­er to con­fig­ure it. This is also needed for Squid­Guard if you want to use it, مجھے کیا کرنا ہے کے طور پر.

11. SquidGuard ساتھ بچے کی حفاظت کے لئے ویب فلٹرنگ

I have young chil­dren in the house and want to block unsuit­able con­tent. This can be achieved with the Squid­Guard pack­age and Shal­la’s Black­lists. Install squid­guard from sys­tem: pack­age man­ager. پھر میں جاتے ہیں خدمات: squid­guard proxy fil­ter. پر جائیں black­list ٹیب, ایڈریس درج https://www.shallalist.de/Downloads/shallalist.tar.gz اور کلک کریں نیچے لوڈ. Then use the Com­mon ACL tab, click on the plus but­ton and select the cat­egor­ies you wish to block. It is also necesary to set up a dummy tar­get cat­egory due to a bug. For more inform­a­tion see this post on pfsense for­um. Don’t for­get to set the default for all of the lists to اجازت دیتے ہیں at the very bot­tom of the lists. Thanks to net­work­inggeek on the pfsense for­ums اس ٹپ کے لئے. Lastly — it may be worth edit­ing a couple of advanced options so that blocked requests are only cached for a short peri­od of time — that way if you decide to unblock some sites you wont have to clear the browser cache to access those sites — there is more inform­a­tion on the pfsense for­um. I had to whitel­ist the category[blk_BL_sex_lingerie] so that my wife could buy under­wear as the fil­ter was block­ing the under­wear sec­tions on main­stream retail­ers (e.g. Debenhams).

12. Enable U‑PNP for a range of services (گیمنگ, پیغام رسانی, سیلاب, وغیرہ)

کے پاس جاؤ Ser­vices: ہے UPnP & NAT-PMP, سب سے نشان لگائیں 2 بکس (فعال کریں ہے UPnP & NAT-PMP and اجازت دیں ہے UPnP Port Map­ping), اور محفوظ کریں پر کلک.

13. بدنیت ٹریفک SNORT ساتھ مسدود

To block detect and block poten­tially mali­cious traffic you can install the SNORT pack­age. I recom­mend run­ning it without block­ing for the first few weeks as it will block lots of things you don’t want due to large num­bers of false pos­it­ives. I recom­mend using the fol­low­ing sup­pres­sion list to avoid some of the most annoy­ing false positives

#AND P2P BitTorrent کے P2P کلائنٹ صارف ایجنٹ (uTorrent کے)
gen_id دبانے 1, sig_id 2011706
#AND P2P BitTorrent DHT announce_peers request
suppress gen_id 1, sig_id 2008585
#(spp_ssl) Invalid Client HELLO after Server HELLO Detected
suppress gen_id 137, sig_id 1
#AND P2P BitTorrent DHT ping request
suppress gen_id 1, sig_id 2008581
#(http_inspect) SIMPLE REQUEST
suppress gen_id 119, sig_id 32
#(http_inspect) UNKNOWN METHOD
suppress gen_id 119, sig_id 31
#(http_inspect) INVALID CONTENT-LENGTH OR CHUNK SIZE
suppress gen_id 120, sig_id 8
#(http_inspect) NO مواد کی طوالت یا منتقلی انکوڈنگ HTTP RESPONSE
suppress gen_id 120, sig_id 3
#(http_inspect) DOUBLE DECODING ATTACK
suppress gen_id 119, sig_id 2
#(http_inspect) HTTP RESPONSE GZIP DECOMPRESSION FAILED
suppress gen_id 120, sig_id 6
#(http_inspect) IIS UNICODE CODEPOINT ENCODING
suppress gen_id 119, sig_id 7
#(http_inspect) BARE BYTE UNICODE ENCODING
suppress gen_id 119, sig_id 4
#(http_inspect) جاوا سکرپٹ obfuscation کے فہرست سطح سے زیادہ 1
gen_id دبانے 120, sig_id 9
#(http_inspect) JAVASCRIPT WHITESPACES EXCEEDS MAX ALLOWED
suppress gen_id 120, sig_id 10
#(http_inspect) میں unescaped SPACE HTTP URI
gen_id دبانے 119, sig_id 33
#(http_inspect) U ENCODING
suppress gen_id 119, sig_id 3
#(http_inspect) DOUBLE DECODING ATTACK
suppress gen_id 119, sig_id 2
#(http_inspect) MULTIPLE ENCODINGS WITHIN JAVASCRIPT OBFUSCATED DATA
suppress gen_id 120, sig_id 11
#(http_inspect) HTTP RESPONSE HAS UTF CHARSET WHICH FAILED TO NORMALIZE
suppress gen_id 120, sig_id 4
#فائل IMAGE DirectShow کی GIF، logical width overflow attempt
suppress gen_id 1, sig_id 27525

14. موڈیم کو ویب تک رسائی حاصل کر رہا ہے, pfsense باکس کے ذریعے

My Net­gear DM200 modem (پاس کے ذریعے موڈ میں) is only access­ible via a fixed آئی پی ایڈریس (192.168.5.1). I wanted to be able to access its web inter­face on LAN com­puters. There are some instruc­tions in the pfsense وکی, but these did­n’t work for me at first. There is a help­ful post by user Non­sense on the pfsense for­um

14B. pfsense ڈیش بورڈ پر موڈیم کنکشن کے اعداد و شمار کی نمائش

After some head­scratch­ing I figured out a way to make the modem stat­ist­ics for my net­gear modem show on my dashboard.
This is done by cre­at­ing a cus­tom wid­get with php code.
Go to dia­gnostics and edit file. Cre­ate a new file at the path

/usr / مقامی / دیکھیے ورلڈ وائڈ ویب / ویجٹ / ویجٹ / modemstatus.widget.php

مواد کے ساتھ

< ?پی ایچ پی کی $ کی حیثیت = file_get_contents("https://کا صارف کا نام:password@192.168.5.1/RST_statistic.htm"); $اسٹیٹس = str_replace("تھا timereset = "5\";","تھا timereset = "0\";",$حالت); گونج $ اسٹیٹس ?>

You will need to cus­tom­ise the user­name and pass­word. The above code works for the Net­gear DM200, and prob­ably oth­er net­gear modems and routers. For oth­er makes of hard­ware you will need a dif­fer­ent address for the stat­ist­ics and you may need to do addi­tion­al manip­u­la­tion of the response using php.
Note that I have over-rid­den the default net­gear refresh inter­val — I’ve turned it off as the reload breaks the dash­board dis­play. To get updated num­bers just refresh the pfsense dash­board using your web browser reload button
Now go to the dash­board and add the wid­get and you’re all done.

15. میں لاگ جب سرٹیفکیٹ انتباہ فکسنگ

ملاحظہ کریں اس گائیڈ

16. مقامی استعمال کرنے کے لئے فائر فاکس پوچھو DNS HTTPS زائد, بجائے ہمارے فلٹرز بائی پاس کے (added April 2020)

In Ser­vices -> DNS حل
Add fol­low­ing line to “cus­tom options” field…

سرور:مقامی زون: "use-application-dns.net." always_nxdomain

17. بجائے بلاک کر وسائل کے لئے pfsense خانے کے ڈومین نام استعمال کریں آئی پی (added April 2020)

Ser­vices -> Squid­Guard Proxy Fil­ter -> Com­mon ACL
Change “ReDir­ect Mode” to “ext url move (داخل یو آر ایل)"
In the “Redir­ect info” field set “https://آپ کے روٹر نام / sgerror.php?url=403%20&ایک =٪ ایک&ن =٪ ن&میں نے٪ میں =&S =٪ s کو&T =٪ T&u=%u”

Leave a Reply

2 Comments

Jجان

Fant­ast­ic guide where do i place this in float­ing rules?
There is one fur­ther tweak required to make sure IPv6 works fully, you need to allow ICMPv6 pack­ets through the fire­wall. Go to Fire­wall, اور پھر رولز. ایک نیا اصول شامل کریں, set the address fam­ily to IPv6, change the pro­tocol to ICMP, leave “any” selec­ted as the sub­types (unless you want to do a lot more read­ing about spe­cif­ic sub­types). محفوظ کریں پر کلک, and then click “Apply Changes”.

Pls keep the guides coming!!

Reply
JSJon Scaife

اضافی معلومات کا شکریہ. I had indeed enabled ICMPv6 pack­ets but must have for­got­ten that I had when I wrote this. I’ll update it. I’m not sure which part of the guide your first ques­tion refers to?

Reply