You are not logged in.

#1 2009-11-19 15:45:13

gamebird
Member
Registered: 2009-02-26
Posts: 3

Problem with tunneling using OpenVPN

Hello!

My pc have address 192.168.0.140.
Router have adress 192.168.0.1.
And my little server have adress 192.168.0.10.

I want to connect with my little server from every place in the net via openvpn.
I installed OpenVPN and conf file for openvpn are inside folder /etc/openvpn/, I suppose that good configuration, becouse I used it on Linksys with OpenWRT. I suppose that configuration on the my pc is right on too.
So i can connect with 192.168.0.10, but i haven't acces to the internet.

I don't know what i should configure iptables. In OpenWRT i configured /etc/config/firewall file, but on arch it doesn't exist.
I can ping 10.1.1.1 (my computer get adress 10.1.1.6).

Tracerote to 208.67.222.222 (opendns) return 10.1.1.1, 192.168.0.1 but next hop have timout.

Command route -n on little server return:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.1.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.1.1.0        10.1.1.2        255.255.255.0   UG    0      0        0 tun0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

What can i fix this problem?

Last edited by gamebird (2009-11-19 16:31:57)

Offline

#2 2009-11-20 17:27:06

gamebird
Member
Registered: 2009-02-26
Posts: 3

Re: Problem with tunneling using OpenVPN

I solved the problem.

iptables -t nat -A POSTROUTING -o eth0 -s 10.1.1.0/24 -j MASQUERADE
/etc/rc.d/iptables save
/etc/rc.d/iptables restart

Offline

Board footer

Powered by FluxBB