Seting-Router-Linux-Standart
Pertama yang harus di lakukan adalah mensetting mgw(main gateway) supaya bisa connect ke internet. Sebelum Mensetting :
1. Minta IP public ke ISP lengkap dengan netmask,broadcast dan dns-nya misalnya :
RANGE : 202.159.121.0/29
IP : 202.159.121.2
GATEWAY : 202.159.121.1
Nemast : 255.255.255.248
Broadcast : 202.159.121.7
DNS1 : 202.159.0.10
DNS2 : 202.159.0.20
berarti kita mendapatkan ip 5 buah dari 202.159.121.2 - 202.159.121.6
2. Menentukan IP local yang akan kita gunakan buat client
Setting IP MGW : [root@mgw kiki]$ vi /etc/sysconfig/network
lalu isi dengan :
NETWORKING=yes
HOSTNAME=mgw.domain.com
GATEWAY=202.159.121.1
lalu simpen dengan menekan :wq
3. Menconfigurasi IP eth0(default)
[root@mgw root]$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
lalu isi dengan :
DEVICE=eth0
BOOTPROTO=static
IPADDR=202.159.121.2
BROADCAST=202.159.121.7
NETMASK=255.255.255.249
onfiltered=yes
USERCTL=no
lalu simpen dengan menekan :wq
4. Setting dns resolve
[root@mgw root]$ vi /etc/resolve.conf
lalu isi dengan nameserver dari isp kita tadi :
nameserver 202.159.0.10
nameserver 202.159.0.20
lalu simpen dengan menekan :wq
5. Setting ip_forwarding
[root@mgw kiki]$ vi /etc/sysctl.conf
rubah net.ipv4.ip_forward = 0 menjadi net.ipv4.ip_forward = 1
atau kalau gak ada net.ipv4.ip_forward = 0 tambahin net.ipv4.ip_forward = 1
simpen dengan menekan :wq
6. Restart network
[root@mgw kiki]$ /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@www root]#chkconfig –level 2345 network on
[root@www root]#
7. Testing dengan ngeping ke default gateway 202.159.121.1
[root@mgw kiki]$ ping 202.159.121.1
64 bytes from 202.159.121.1: icmp_seq=1 ttl=63 time=0.356 ms
64 bytes from 202.159.121.1: icmp_seq=2 ttl=63 time=0.269 ms
64 bytes from 202.159.121.1: icmp_seq=3 ttl=63 time=0.267 ms
64 bytes from 202.159.121.1: icmp_seq=4 ttl=63 time=0.268 ms
— 202.159.121.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.267/0.290/0.356/0.038 ms
8. Testing untuk ngeping google.com untuk ngecek dns-nya, kalau muncul :
PING google.com (216.239.39.99) 56(84) bytes of data, berarti dns kita untuk mgw dah bekerja, tapi kalau muncul = ping: unknown host google.com
berarti dns yang kita isikan di /etc/resolve.conf masih salah,silahkan cek lagi ke ISP nya. Nah bereskan sudah setting IP untuk mgw-nya, supaya mgw ini bisa sekaligus digunakan sebagai dns server oleh client maka harus di install daemon bind atau daemon nameserver yang lain atau kalau sudah ada tinggal hidupkan bind-nya.
[root@www root]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@www root]#chkconfig –level 2345 named on
[root@www root]#
Misalnya ip ke client adalah :
192.168.0.1/24
IP : 192.168.0.1
Netmask : 255.255.255.0
Broadcast : 192.168.0.255
RANGE IP CLIENT : 192.168.0.2-192.168.0.254
1. Setting ip untuk eth1 (yang ke client)
[root@mgw kiki]$ vi /etc/sysconfig/network-scripts/ifcfg-eth1
lalu isi dengan :
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
onfiltered=yes
USERCTL=no
lalu simpen dengan menekan :wq
2. Restart networknya
[root@mgw root]$ /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
3. Testing dengan cara ping ip eth1
[root@mgw kiki]$ ping 192.168.0.1
64 bytes from 192.168.0.1: icmp_seq=1 ttl=63 time=0.356 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=63 time=0.269 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=63 time=0.267 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=63 time=0.268 ms
— 192.168.0.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.267/0.290/0.356/0.038 ms
Tinggal Setting IP computer client dengan ketentuan di bawah ini :
IP : 192.168.0.2 - 192.168.0.254
GATEWAY : 192.168.0.1
NETMASK : 255.255.255.0
BROADCAST : 192.168.0.255
NAMESERVER : 192.168.0.1
Misal :
Client01
===============================
IP : 192.168.0.2
GATEWAY : 192.168.0.1
NETMASK : 255.255.255.0
BROADCAST : 192.168.0.255
NAMESERVER : 192.168.0.1
Client02
===============================
IP : 192.168.0.3
GATEWAY : 192.168.0.1
NETMASK : 255.255.255.0
BROADCAST : 192.168.0.255
NAMESERVER : 192.168.0.1
Dan seterusnya sesuai banyaknya client,yang berubah hanya IP untuk client windows maka setting IP di bagian Start Menu/Setting/Control Panel/Network.
Setelah di setting ip client, maka coba ping ke 192.168.0.1 dari client,kalau berhasil berarti client dan MGW nya sudah tersambung.
Setting MGW supaya client bisa internet dengan menggunakan NAT
1. Matikan iptablesnya
[root@mgw root]# /etc/init.d/iptables stop
Removing user defined chains: [ OK ]
Resetting built-in chains to the default ACCEPT policy: [ OK ]
[root@mgw root]#
2. Tambahkan iptables untuk Source NAt sesuai dengan ip di eth0
[root@mgw root]# /sbin/iptables -t nat -A POSTROUTING -o eth0 -s
192.168.0.0/24 -j SNAT –to-source 202.159.121.2
[root@mgw root]# /sbin/iptables-save > /etc/sysconfig/iptables
[root@mgw root]# /etc/init.d/iptables restart
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules: [ OK ]
[root@mgw root]# iptables-save
SNAT sudah,SNAT disini standar sekali dan gak ada proteksi untuk mengetestnya kita browser di client lalu buka google.com, kalau jalan berati kita sudah berhasil
.
Wassallam


Thursday, July 3rd 2008 at 5:14 pm
WOW. experd bgt nieh kayanya. hehehe muantabs buangets dech.
Share ke gw donk ilmunya ;))
emang berat deh kl baca tulisannya kiki.
btw visit ke my blog donk. Tapi jgn di hina cos masih tingkat teri nih ;))
Tuesday, November 10th 2009 at 8:56 am
wow gold tks
Wednesday, December 9th 2009 at 2:27 am
Hello!
cheap cialis ,
Tuesday, June 29th 2010 at 11:05 pm
< blockquote >< a href=”http://pillspot.org/”>PillSpot.org. Canadian Health&Care.Best quality drugs.No prescription online pharmacy.Special Internet Prices. High quality drugs. Buy drugs online< /a >…
Buy:Nexium.Prevacid.Petcam (Metacam) Oral Suspension.Accutane.100% Pure Okinawan Coral Calcium.Synthroid.Zyban.Arimidex.Actos.Retin-A.Prednisolone.Lumigan.Valtrex.Human Growth Hormone.Zovirax.Mega Hoodia….
Friday, July 2nd 2010 at 3:01 pm
Your website is very great. I enjoyed your website a lot. Thank you.
Sunday, July 4th 2010 at 3:29 am
Whilst this topic is usually extremely touchy for most people, my opinion is the fact that there has being a middle or common ground that we all can uncover. I do appreciate that youve added relevant and intelligent commentary below though. Thank you!
Monday, July 12th 2010 at 4:07 am
ciputnet.com is great! Payday loans for bad credit are offering financial help to the poor creditors The absence of credit checks makes the bad creditors eligible for the desired funds
Thursday, July 15th 2010 at 7:46 am
iii countries stabilization
Thursday, July 15th 2010 at 7:54 am
warmer growth pattern ocean
Thursday, July 22nd 2010 at 7:33 pm
You write very detailed,Pay tribute to you.Couldn’t be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing!
Friday, July 23rd 2010 at 2:27 am
This post is great.
Tuesday, July 27th 2010 at 7:00 pm
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
Tuesday, July 27th 2010 at 8:46 pm
Advantageously, the post is in reality the freshest topic on curing acne naturally. I concur with your conclusions and will thirstily look forward to your upcoming updates. Just saying thanks will not just be enough, for the phenomenal clarity in your writing. I will right away grab your rss feed to stay abreast of any updates.
Wednesday, July 28th 2010 at 12:34 pm
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
Wednesday, July 28th 2010 at 4:14 pm
I love reading and I am always searching for informative information like this! You are bookmarked!. . . . . .
Thursday, July 29th 2010 at 11:06 am
I wanted to thank you for this great read!! I definitely enjoying every little bit of it.I have you bookmarked to check out new stuff you post.
Friday, July 30th 2010 at 11:16 am
I have some trouble to subscribe the rss feed, anyway I’ve bookmarked this site, is very useful and full of informations.
Friday, July 30th 2010 at 3:48 pm
Finding websites with as much information as this one is always a pleasure I wll be sure to come back and visit again real soon, keep up the good work.
Saturday, July 31st 2010 at 11:05 am
I really like your site and i really appreciate the excellent quality content you are posting here for free for your online readers. Can you tell us which blog platform you are using?
Saturday, July 31st 2010 at 2:27 pm
Wow, very interesting article. It’s funny how history can be twisted in so many different ways. These photos certainly give us clues, but I guess we’ll never know the true story. . . .
Thursday, August 5th 2010 at 4:19 am
U wilt geld lenen zonder BKR toetsing? De opties hiervoor worden groter, kijk verder en ontdek hoe u wél geld kunt lenen, snel & eenvoudig.
Saturday, August 7th 2010 at 7:25 pm
I am just making a blog related to this. If you allow, I would like to use some of your content. And with full refernce of course. Thanks in advance.
Monday, August 9th 2010 at 11:39 am
Hi I found your site by mistake when i was searching yahoo for this acne issue, I must say your site is really helpful I also love the design, its amazing!. I don’t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site.
Monday, August 9th 2010 at 5:48 pm
This is a really good read for me. Must admit that you are one of the coolest bloggers I ever saw. Thanks for posting this informative article.
Tuesday, August 10th 2010 at 12:39 pm
I was just browsing for relevant blog posts for my project research and I happened to stumble upon yours. Thanks for the useful information!
Saturday, August 14th 2010 at 3:51 am
Cheers for this post, it was great to read.
Thursday, August 19th 2010 at 11:46 am
Aw, this was a really quality post. In theory I’d like to write like this too - taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get something done.
Friday, August 20th 2010 at 10:32 am
I’ve read some good stuff here. Definitely worth bookmarking for revisiting.
Friday, August 20th 2010 at 11:31 am
Thank you so much for this valuable information. Very useful indeed. . . . .
Friday, August 20th 2010 at 11:44 am
I’ve read some good stuff here. Definitely worth bookmarking for revisiting.
Saturday, August 21st 2010 at 11:38 am
I enjoyed reading your blog. Keep it that way.
Saturday, August 21st 2010 at 10:06 pm
This post is interesting.
Sunday, August 22nd 2010 at 3:40 pm
This is a usefull post.
Tuesday, August 24th 2010 at 6:43 am
Hi, I wish to let all of you bloggers / internet users know about a whole new Search Engine called Braxea. Its pretty dam cool… It combines Google, Bing and Yahoo into one and in addition lets you search for videos on YouTube and News throughout the net. Maybe this will end up being the new Google ?
Wednesday, August 25th 2010 at 9:28 am
Your web publication is very useful. Say thanks to you very much for providing a huge amount of beneficial critical information. I am going to bookmark your blog website and will be most definitely coming back. Yet again, I recognize the value of your work together with delivering much effective answers to the followers.
Thursday, August 26th 2010 at 1:46 pm
Nice stuff. I will come back again soon to read some more.
Sunday, August 29th 2010 at 8:12 pm
interesting post, pretty much covered it all for me, thanks.
Monday, August 30th 2010 at 4:11 pm
Cotton http://zasiangje.AUTOTECHGUIDE.INFO/tag/Cotton+Curtain+panel+wooden/ : Curtain…
Curtain…
Monday, August 30th 2010 at 6:59 pm
Absolutely brilliant post guys, been following your blog for 3 days now and i should say i am starting to like your post. and now how do i subscribe to your blog?
Monday, August 30th 2010 at 9:07 pm
Thanks for good news! Your site is very useful for me. I bookmarked your site!
Wednesday, September 1st 2010 at 8:22 am
Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
Sunday, September 5th 2010 at 5:39 am
Find Payday Loan Bay Street, Toronto, ON M5H 2Y3 (416) 477-2742
Monday, September 6th 2010 at 1:17 am
If the underlying share price moved disastrously against you overnight, for example, you might lose the whole of your investment if you had bought the share. However, if you had placed a bet on the share and you had imposed a guaranteed stop-loss limit, you would limit your loss to a predetermined amount. A stop-loss is exactly what it is called - a limit to the amount you might lose. On the other hand, there is no limit to the amount you might win. Financial spread betting provides a simple, tax-free* way to profit from rising and falling prices on a range of different markets. As a world leader in spread betting for 35 years, IG Index is the UK’s largest and longest running financial spread betting company. With IG Index you can take positions on forex pairs, global stock indices, over 7000 shares, commodities, binary bets and more Financial Spread Betting is the most efficient leverage tool for traders, in the financial markets. Traders have the opportunity to trade with no real ownership in the market. Explore the Financial Spread Betting markets and learn how to trade successfully.As current or future investors you are well aware of the fact that in order to trade in the financial market you need to own or be a part of it as far as investment of money goes. With Financial Spread Betting the story is different.This is your chance to get involved in the stock market or in any other financial market with a value such as gas, oil gold and so on, without actually being invested. This is not only convenient financially but also requires less effort as far as bureaucracy goes.So what is Financial Spread Betting anyway?Financial Spread betting enables the trader to lay an over / under bet with the ability to minimize the risks and optimize the profits by ending the bet as soon as it goes the other way around from the bet (stop loss) or getting out while you are ahead.Financial Spread Betting is available for various products including shares, currency exchange, commodities and just about anything with a value.The spread is the difference between the bid and the offer price for example taking the apple stock and placing a bet that it will rise (go long) and it indeed rise, then you will get your bet times the number of points it went up.Financial spread betting is gaining popularity in Europe and mainly in the UK. Even though it existed for years, it is now becoming available online and much like other new trends online, many companies are seeking the opportunity of catching customers by offering lucrative incentive offers such as welcome bonus.