Requirements
- Two routers with Tomato (I am using two Asus 520GU Routers running Tomato VPN
- Version used at the time of writing this: Tomato Firmware v1.27.8744 vpn3.6 ND USB VPN
- OpenVPN on a computer so you can generate the static key
- A bit of time :)
Assumptions
Router 1, we'll call Jane, is on subnet 192.168.3.0/24
Router 2, we'll call Susan, is on subnet 192.168.6.0/24
Jane will be playing the part of server.
Susan will be playing the part of the client.
Firewalls/Open ports and other things Oh my. I am assuming that your Cable/DSL modem is sending all traffic to your router. As in if you forward a port on your Tomato router it actually gets forwarded.
Step 1 Generate the key
Run the following on the computer with the OpenVPN binary
openvpn --genkey --secret my_keyname.key
openvpn --genkey --secret my_keyname.key
Save this file for later.
**Keep in mind if someone gets a hold of this they can authenticate to your VPN network.
Starting from the Tomato main page
VPN Tunneling > Server > Server 1
Basic Tab
Start with WAN: Check
Interface Type: TUN
Protocol: TCP
Port: 1194
Firewall: Automatic
Authorization Mode: Static Key
Local/Remote end point addresses: Box 1: 10.8.0.1 Box 2: 10.8.0.2
Advanced Tab
Add the following in the Custom Configuration text box:
script-security 2
route-up "/sbin/route add -net 192.168.6.0 netmask 255.255.255.0 gw 10.8.0.2"
Notice in the -net option I have the network for Susan
Keys Tab
Paste the contents of my_keyname.key into the Static key text area.
Click save and then Start Now
Step 3 Configure the Client (Susan)
Starting from the Tomato main page of Susan
VPN Tunneling > Client > Client 1
Basic Tab
Start with WAN: CHECK
Interface Type: TUN
Protocol: TCP
Server Address/Port: Box 1: XXX-no.ip.org Box 2: 1194
Firewall: Automatic
Authorization Mode: Static Key
Create NAT on tunnel: Unchecked
Local/Remote end point addresses: Box 1: 10.8.0.2 Box 2: 10.8.0.1
*Notice how the Local/Remote end point have swapped here.
Advanced Tab
In the Custom Configuration text box add the following:
route 192.168.3.0 255.255.255.0
Click save and then Start Now
Click save and then Start Now
DONE!
That is it! you should be able to connect to systems from 192.168.3.0/24 to systems on 192.168.6.0/24 and vice versa.
If you are having problems a good way to troubleshoot is starting the server only and seeing if you can connect to your IP address on port 1194 (Using netcat or telnet). If you can't your firewall is probably causing issues.
Resources
http://openvpn.net/index.php/open-source/documentation/miscellaneous/78-static-key-mini-howto.html
Additional
I found it helpful to have the actual configs that Tomato creates for the client and the server so that I could easily setup other systems to interact via openvpn with this setup. With the following below one could setup two end points using openvpn on any other system.
Client Config
Server Config
Additional
I found it helpful to have the actual configs that Tomato creates for the client and the server so that I could easily setup other systems to interact via openvpn with this setup. With the following below one could setup two end points using openvpn on any other system.
Client Config
daemon
dev tun11
proto tcp-client
remote xxxx.no-ip.org 1194
ifconfig 10.8.0.2 10.8.0.1
resolv-retry 30
nobind
persist-key
persist-tun
comp-lzo adaptive
verb 3
secret static.key
status-version 2
status status
# custom configuration
route 192.168.3.0 255.255.255.0
Server Config
daemon
ifconfig 10.8.0.1 10.8.0.2
proto tcp-server
port 1194
dev tun21
comp-lzo adaptive
keepalive 15 60
verb 3
secret static.key
status-version 2
status status
# Custom configuration
script-security 2
route-up "/sbin/route add -net 192.168.6.0 netmask 255.255.255.0 gw 10.8.0.2"
Your tutorial is great, but you forgot to set the iptables entries neccessary. This lead to only being able to ping from the router on one subnet to the clients on the other subnet. For all clients to be able to connect, add this to the firewall startup-script:
ReplyDeleteServer side:
------------
iptables -I FORWARD -i br0 -o tun21 -j ACCEPT
iptables -I FORWARD -i tun21 -o br0 -j ACCEPT
iptables -I INPUT -i tun21 -j ACCEPT
Client side:
------------
iptables -I FORWARD -i br0 -o tun11 -j ACCEPT
iptables -I FORWARD -i tun11 -o br0 -j ACCEPT
iptables -I INPUT -i tun11 -j ACCEPT
Now you should be able to connect to all clients in your VPN.
(http://www.dd-wrt.com/wiki/index.php/OpenVPN#GUI_Client_Mode_Custom_Parameters)
Also, on the client side, in the firewall script, I had to add
ReplyDeleteip route add 192.168.3.0/24 dev tun11
i have been looking left and right for a simple openvpn on tomato routers. This one hits the spot
ReplyDeleteThank you very much for your tutorial. It is very helpful. I have a question about to add route in customer configuration.
ReplyDeleteI have two subnets need to add, eg. like below. But only the last one being taken.
script-security 2
route-up "/sbin/route add -net 192.168.6.0 netmask 255.255.255.0 gw 10.8.0.2"
route-up "/sbin/route add -net 192.168.7.0 netmask 255.255.255.0 gw 10.8.0.2"
Any work around? Thanks.
maybe this will work: route-up "/sbin/route add -net 192.168.6.0 netmask 255.255.255.0 gw 10.8.0.2; /sbin/route add -net 192.168.7.0 netmask 255.255.255.0 gw 10.8.0.2"
ReplyDeleteThis tutorial is great and I have followed everything in the turtorial and in the comments, but I can only see in one direction. The client can ping everything in the servers subnet but the server can't ping anything in the clients subnet. It's almost like its not being routed down the tunnel. I can ping the end of the tunnel 10.8.0.2 but that is all I can ping client side.
ReplyDeleteQuite an informative share. I also have to buy a good VPN and researched online. Found promising hidemyass vpn review and seems like a good option and it also allows simultaneous connections too. So planning to buy its subscription soon.
ReplyDeleteGreat job on this !
ReplyDeleteRouter Login not working
routerlogin admin page
Routerlogin
Routerlogin Net
Good information, but technically the title of the post would be more accurate if it said "connect" rather than "bridge". In order to bridge the client and server lans, the configuration must use "dev tap" instead of "dev tun".
ReplyDeleteYalova
ReplyDeleteHatay
Muş
Bursa
Mersin
ZRZJCP
ankara parça eşya taşıma
ReplyDeletetakipçi satın al
antalya rent a car
antalya rent a car
ankara parça eşya taşıma
FC8301
kırklareli evden eve nakliyat
ReplyDeleteısparta evden eve nakliyat
istanbul evden eve nakliyat
ankara evden eve nakliyat
kırıkkale evden eve nakliyat
1RYS8
CA6CE
ReplyDeleteKarabük Lojistik
Çanakkale Lojistik
Tokat Lojistik
Niğde Parça Eşya Taşıma
Aydın Lojistik
F275C
ReplyDeleteNiğde Parça Eşya Taşıma
Kayseri Evden Eve Nakliyat
Bolu Lojistik
Kırşehir Evden Eve Nakliyat
Manisa Evden Eve Nakliyat
B9C03
ReplyDeleteArdahan Evden Eve Nakliyat
Silivri Boya Ustası
Şırnak Evden Eve Nakliyat
Samsun Evden Eve Nakliyat
Urfa Evden Eve Nakliyat
85C11
ReplyDeleteÇerkezköy Çamaşır Makinesi Tamircisi
Antalya Şehir İçi Nakliyat
Kütahya Şehir İçi Nakliyat
Amasya Parça Eşya Taşıma
Siirt Lojistik
Elazığ Parça Eşya Taşıma
Urfa Parça Eşya Taşıma
Keçiören Boya Ustası
Iğdır Evden Eve Nakliyat
2091A
ReplyDeleteKaraman Parça Eşya Taşıma
Antep Parça Eşya Taşıma
Ünye Oto Boya
Isparta Şehir İçi Nakliyat
Maraş Lojistik
Karaman Şehir İçi Nakliyat
Ünye Çekici
Ankara Lojistik
Aksaray Parça Eşya Taşıma
F25BA
ReplyDeletekastamonu görüntülü sohbet canlı
kırıkkale parasız sohbet siteleri
kilis sohbet chat
samsun mobil sohbet siteleri
karabük telefonda sohbet
bilecik canlı sohbet uygulamaları
karabük muhabbet sohbet
nevşehir sohbet sitesi
aksaray sohbet
E2B33
ReplyDeleteelazığ sohbet chat
giresun rastgele görüntülü sohbet ücretsiz
agri canli sohbet chat
rastgele sohbet
zonguldak telefonda rastgele sohbet
afyon parasız görüntülü sohbet uygulamaları
erzincan parasız sohbet
osmaniye yabancı görüntülü sohbet
sesli sohbet odası
478B8
ReplyDeleteTelegram Abone Satın Al
Btcturk Borsası Güvenilir mi
Binance Referans Kodu
Raca Coin Hangi Borsada
Kripto Para Nasıl Oynanır
Bitcoin Yatırımı Nasıl Yapılır
Parasız Görüntülü Sohbet
Linkedin Takipçi Satın Al
Tesla Coin Hangi Borsada
BHVGCFXD
ReplyDeleteشركة تنظيف مكيفات
شركة عزل اسطح بحائل REPtmaVhHo
ReplyDeleteشركة تنظيف فلل بالقطيف 83wT6Lbj9q
ReplyDeleteشركة مكافحة النمل الابيض بالاحساء 7HgyUGTmGI
ReplyDeleteشركة مكافحة الحشرات بالاحساء 9BDOyUUxh1
ReplyDeleteشركة تنظيف بالاحساء si8TaieSqZ
ReplyDeleteشركة تسليك مجاري بالدمام WB36oHIfeZ
ReplyDelete1EF37880BB
ReplyDeleteEn Güvenilir VPN
twitter takipçi
guvenilir takipci
Arkadaşlarla Oynanabilecek Oyunlar
Coin Nereden Alınır
Ücretsiz Online Oyunlar
Para Kazandıran Oyunlar 2025
İngilizce Öğrenme Teknikleri
Footer Link