linux openvpn route add command failed [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am trying to access my office vpn through their provided opvn file with my linux (ubuntu 14.04 LTS) laptop, but it is failing with following error:
Wed May 6 22:36:55 2015 /sbin/ip route add xxx.xxx.xxx.xxx/16 via yyy.yyy.yyy.yyy (actual ips hidden here)
RTNETLINK answers: Invalid argument
Wed May 6 22:36:55 2015 ERROR: Linux route add command failed: external program exited with error status: 2
The error repeats for many different ips.
It does work through our windows 7 computer so it must be some configuration issue on the linux machine. And I would like some help to fix this.
I am running openvpn through the terminal with a script doing the following:
1) change nameserver to company nameserver (sudo sed -i "s:127.0.0.1:xx.xx.xx.xx:g" /etc/resolv.conf
2) sudo openvpn --config /etc/openvpn/my_vpn_file.ovpn
I have been able to figure out that there probably somehow are multiple connections to the vpn..? So I guess the start would be to find and remove that/those other ones, but how?
(I am not a complete novice in the linux world, but in the network/routing world - and stackoverflow!)
Thanks in advance!

The problem is with your route command:
/sbin/ip route add xxx.xxx.xxx.xxx/16 via yyy.yyy.yyy.yyy (actual ips hidden here)
RTNETLINK answers: Invalid argument
Something about that is fishy -- but, lacking the IPs, I can't say what exactly. However, since you're using a /16, that means that these are private IPs (RFC 1918), which means they are meaningless for helping someone identify who you are, so I strongly recommend you edit your initial posting with the real IPs. I'm imagining there's overlap or something.

Related

How to configure localhost on Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I'm trying to set up a virtual machine with CentOS 7 to use it as an Oracle Database Server (I'm new to Linux). I have encountered a problem about the host configuration that as I was reading has to be configured previously.
You see, this is where I collide with my knowledge that I have in windows. I thought it was enough to change the device name like this:
[root#localhost.localdomain ~] # hostname SERVER01
[root#localhost.localdomain ~] # hostname
SERVER01
[root # SERVER01 ~] #
And I do not understand why from windows I can not ping the Linux machine only using its hostname (SERVER01)
The ping request could not find host SERVER01. Check the name and
try again.
I understand that the previous configuration of the host in CentOS 7 that I am asked to install the database server has to do with the fact that I can not ping it using SERVER01. Although I have to clarify that using the IP if I can.
What do I do to make that change in Linux and can ping only using the hostname as it happens in windows?
When you change the hostname in linux you are essentially just telling the OS "this is your name".
In order to reflect that on the network mapping as well, you need to edit the hosts file:
nano /etc/hosts
or if you are a vi fan:
vi /etc/hosts
Note that you will need root access to do this.
In that file you can just extend the localhost mapping to also include your custom hostname SERVER01
127.0.0.1 localhost.localdomain localhost SERVER01
Once you do this, from the same CentOS terminal you can type ping SERVER01 and it should give you a proper ping results.
If you want to be able to ping and access the services on that virtual machine from your Windows OS, then you will need to do the same mapping through the hosts file on your Windows, but this time you will have to use the IP provided to the vm, instead of 127.0.0.1.

Connecting WinSCP with Ubuntu on VirtualBox [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm trying to connect Winscp with virtual machine. I'm working on Windows,and this problem is killing me for 5 hours. Studied a lot of examples, but I can't find out what is the problem. I tried to connect with putty to, but connection is every time refused. Tried to connect with every protocol, but didn't help. I even can't install ssh into Ubuntu, because something is blocking but not firewall(failed to fetch us archive ubuntu com). Port forwarding too wasn't very helpful.
1st Adapter is NAT, and second host-only.
Problem is that I need to enter home directory, and add some files, so I'm trying to find the easiest way to do this.
I would really appreciate any help. Here is my ifconfig, ip a, and interfaces picture.
1
Thanks!
Use the following step to configure.
1- Run ipconfig /all on your windows machine and see which ip are assigned to your virtual adopters.
2- Assign the same range ip to your virtual machine. For example:
If on virtual adopter ip is: 192.168.130.1
Then assign ip to your vm as: 192.168.130.*
and set gateway to : 192.168.130.1
and restart the service network and check the reachability by pinging from both side.
3- If You able to ping then you will be able to use internate on your VM. Then install the ssh.
Now you will be able to use.

Ifconfig doesn't provide any Details on Kali Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Folks,
I have Kali linux running on VM machine..there are 2 interfaces configured on this machine..1 interface is configured as "share with my Mac" and the other interface is configured as "Private to Mac".And i believe "private to Mac" option will allow me to connect my VM linux machine to the local machine.... ifconfig command doesn't show any output. i have manually configured the IP address to both interface by editing vi /etc/network/interfaces and restarted the network services using the command "/etc/init.d/networking restart"...but still ifconfig doesn't give any result....
Actually i want to communicate on port ssh from my local machine to the linux vm machine..since the machines do not communicate each other.i am not able to work anymore..Can someone please have a look in this issue and let me know what changes are required to complete my requirement...
Have you tried sudo ifconfig ? If it doesn't work the problem could be the drivers of your network card. I'm not sure this will works but you can watch this tutorial How to install network card to Kali

wget: unable to resolve host address “www.cmake.org” [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm trying to install cmake at my CentOS 6.2, but for some reason i get this error message :
Resolving www.cmake.org... failed: Temporary failure in name resolution.
wget: unable to resolve host address “www.cmake.org”.
This is the command i wrote :
wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
This is probably old, but here is how it worked for me:
1. Comment out the IPV6 properties on /etc/sysconfig/network-scripts/ifcfg-eth0
#IPV6_AUTOCONF=yes
#IPV6INIT=yes
2. Restart your network service.
service network restart
Then wget worked like a charm ;)
Yes. In my case this was because of wrong entry of DNS server in my local "/etc/resolv.conf".
I have added the proper entry in "/etc/resolv.conf" and then restarted the netwrork using "# service network restart".
Then I was able to use "wget".
Thank you very much.
I know I am necro-posting, but, I found a solution to this, and the solutions is that, you may have set-up a static ip which is not working in Raspberry Pi (basically it doesn't have internet access), So, removing the "ip" line from "/boot/cmdline.txt/" seems to helped me.

linux interface based routing with two interfaces [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
i have 2 interfaces on linux instance. both have static IPs . i have traffic from outside world coming to eth0(208.67.x.x) and inside my server i want the traffic to be redirected to eth1(192.168.X.x) to talk to any application inside.
Please help me on the route configs ..and can I do that on linux instance?
You can use a simple package called Firestarter. Firestarter internally edits iptables which are the actual rules to forward packets from source to destinations inside the linux kernel. Please follow the following guidelines to solve your problem. Note that I have given command line examples below but there is also a gui to help you with the setup.
Install firestarter on ubuntu using the command in the shell
sudo apt-get install firestarter
Define the external and internal interfaces in the /etc/firestarter/configuration file at appropriate places.
Select dhcp server on/off if you wish to run dhcp server on internal network interface.
You can also define rules for inbound and outbound traffic as firestarter is also a firewall. The rules can be defined in /etc/firestarter/inbound and /etc/firestarter/outbound folders.
For more information on iptables and firestarter visit :
https://help.ubuntu.com/community/IptablesHowTo
Hope this helps you with your problem. Thanks!

Resources