Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Are you using OpenVPN bridging on the remote side? More specifically, give details including ips and routing tables. Is the connection correctly established?
This is the configuration files
======================================
#Site1.conf
# Use interface TUN
dev tun
# 10.0.0.1 Ip for Site 1
# 10.0.0.2 Ip for Site 2
ifconfig 10.0.0.1 10.0.0.2
# Go to directory OpenVPN
cd /etc/openvpn
#Use static key
secret chave
#OpenVPN will use 5000/UDP
port 5000
#Usuer for daemon
user nobody
#Group for daemon
group nogroup
#Use LZO Compact library
comp-lzo
#Keep alive the connectio using ping
ping 15
#Log
verb 3
#Site2.conf
# Use interface TUN
dev tun
# 10.0.0.1 Ip for Site 1
# 10.0.0.2 Ip for Site 2
ifconfig 10.0.0.2 10.0.0.1
#Call the ip for Site 1
remote External_Ip_for_Site_1
# Go to directory OpenVPN
cd /etc/openvpn
#Use static key
secret chave
#OpenVPN will use 5000/UDP
port 5000
#Usuer for daemon
user nobody
#Group for daemon
group nogroup
#Use LZO Compact library
comp-lzo
#Keep alive the connectio using ping
ping 15
#Log
verb 3
#starting the Tunel in site 1
route add -net ip_network_site2/Mask gw 10.0.0.2
openvpn --config /etc/openvpn/site1.conf --daemon
#starting the Tunel in site 2
route add -net ip_network_site1/Mask gw 10.0.0.1
openvpn --config /etc/openvpn/site2.conf --daemon
======================================
I am successfuly ping both machine but no internal machines inside the networks.
In the Site 1 machine there is a Iptables firewall and squid. This machine has a valid ip address
In Site 2 there is a CISCO router doing ip nat iniside to the VPN gateway ( Site 2 Machine).
dear all.
First of all, I am a really bad writing english.
But I can help you.
For rich the internal network, you must be have a route tables for this.
something like this...
ip route add internal-network/mask via tun-ip.
I am sugestting read ip-rute man.
Please remember enable ping, if nmap is not been used.
very good.
But not have a rute jaja
If you no have a rute not have ping.
After vpn is up.
type (inte the sit1 shell)
$ip route add 10.0.1.0/24 via 192.168.0.1
type (in the sit2 shell)
$ip route add 10.0.2.0/24 via 192.168.0.2
where
10.0.1.0 - internal net sit1
192.168.0.1 - tun0 - sit1
10.0.2.0 - internal net sit2
192.168.0.2 - tun0 sit2
If you need more help, please sen me your two rute tables.
type
$rute >route-sit1
regards
you have a semantic problem.
I am explain you how to route internal networks throughput vpn.
Fot this example.
ifaces in sit1
10.0.0.1 tun0
192.168.1.1 eth1
ifaces in sit2
10.0.0.2 tun0
192.168.2.1 eth1
route table in sit1
ip route add 192.168.2.0/24 via 10.0.0.1
route table in sit2
ip route add 192.168.1.0/24 via 10.0.0.2
remember.
Is impossible route two network with the same ip segment.
If you not have a route, no have ping
But see my start vpn files
========================
#starting the Tunel in site 1
modprobe tun
echo 1 > /proc/sys/net/ipv4/ip_forward
route add -net 172.19.128.0/23 gw 10.0.0.2
openvpn --config /etc/openvpn/site1.conf --daemon
#starting the Tunel in site 2
modprobe tun
echo 1 > /proc/sys/net/ipv4/ip_forward
route add -net 192.168.0.0/24 gw 10.0.0.1
openvpn --config /etc/openvpn/site2.conf --daemon
=========================================
The ip routes are already in there ...
Sorry I am not understanding you about this route tables.
your problem is 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1, should be tun0
type in shell.
ip route add 192.168.0.0/24 via 10.0.0.1
if you dont understend, send me a diagram for more info.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.