# Basic Linux Help Needed



## memnarc (Sep 20, 2013)

This is my files:

[email protected]:/etc/openvpn/easy-rsa/keys# ls
-server.crt  01.pem  dh1024.pem      index.txt.old  ta.key
-server.csr  ca.crt  index.txt       serial
-server.key  ca.key  index.txt.attr  serial.old
[email protected]:/etc/openvpn/easy-rsa/keys#


Trying to copy server.crt and server.key into openvpn which is two directories above it.
Tried the following:
 
[email protected]:/etc/openvpn/easy-rsa/keys# cp server.key ../../
cp: cannot stat `server.key': No such file or directory


And also the following

[email protected]:/etc/openvpn/easy-rsa/keys# cp -server.key ../../
cp: invalid option -- 'e'
Try `cp --help' for more information.

These instructions are from the LowEndBox OpenVPN tutorial. 

Thank you!


----------



## drmike (Sep 20, 2013)

Well,   are you sure those files exist?

This is a quick get going now OpenVPN script, give it a try:

https://github.com/Nyr/openvpn-install


----------



## jarland (Sep 20, 2013)

Is that a dash in the filename? If so, do it like this:

cp -- '-server.key' ../../


----------



## vanarp (Sep 20, 2013)

You could try the following command:


```
cp -- '-server.key' /../../
```


----------



## vanarp (Sep 20, 2013)

I see @jarland provided the solution well before me 

Let me explain why the syntax solves the problem. _Double hyphens tell the command that whatever follows them are only positional parameters but not options to the command itself_.


----------



## memnarc (Sep 21, 2013)

Thanks for all the helpful posts.  I've been fiddling with the instructions and have gotten further down the tutorial. 

Command:

sudo /sbin/iptables -A FORWARD -i venet0 -o tap0 -m state –state RELATED,ESTABLISHED -j ACCEPT

Error Message:

[email protected]:/etc/openvpn/easy-rsa# sudo /sbin/iptables -A FORWARD -i venet0 -o tap0 -m state -state RELATED,ESTABLISHED -j ACCEPT
Bad argument `RELATED,ESTABLISHED'
Try `iptables -h' or 'iptables --help' for more information.
[email protected]:/etc/openvpn/easy-rsa# sudo /sbin/iptables -A FORWARD -i venet0 -o tap0 -m state -state RELATED, ESTABLISHED -j ACCEPT
Bad argument `RELATED,'
Try `iptables -h' or 'iptables --help' for more information.


----------

