I can change that easily on linux using torrc file, but cannot find the option on tor browser for windows.
It looks like it can be done via "vidalia": but how to access that ?
I cannot find any vidalia on my TOR browser
The Tor Browser Bundle on Windows includes a torrc file which should be located at \Browser\TorBrowser\Data\Tor\torrc under where you install Tor Browser to.
You can add or change the ExitNodes option in the file to the country you want to use (e.g. {US}).
If you're using the Expert Bundle, it does not ship with a torrc file, but you can specify one when you run Tor from the command line:
tor.exe -f C:/path/to/torrc
Or just specify your options from the command line:
tor.exe -f C:/path/to/torrc ExitNodes {US}
Get the default copy of torrc from here.
The country code list is available here -> http://startup-bootcamp.fr/liste-des-codes-des-pays-tor/
You can choose or exclude specific country in your torrc configuration file.
Related
To work remotely I need to SSH into the main server and then again into the departmental server.
I would like to set up a tunnel using sublime text 3 wbond sftp package to view and edit files remotely but I can't seem to find any information for setting up a tunnel. Is this even possible?
The reason I'm interested in this particular package is because I am unable to install any packages locally on the server, hence using something like rsub is not possible.
Any other suggestions besides sublime sftp are welcome.
I'm not sure the SFTP plugin would allow to do this directly.
What i would suggest is for you to use ssh -L to create a tunnel.
ssh -L localhost:random_unused_port:target_server:22 username_for_middle_server#middle_server -nNT
Use the password/identity_file for the middle server
The -nNT is to avoid opening an interactive shell in the middle server.
IMPORTANT: You need to keep the ssh -L command running so keep that shell open.
In this way you can connect to the target_server as such:
ssh username_for_target_server#localhost -p random_port_you_allocated
Similarly you can setup the SFTP plugin file as such
{
...
"host":"localhost",
"user":"username_for_target_server",
"ssh_key_file": "path_to_target_server_key",
"port":"random_port_you_allocated",
....
}
As a sidenote, always use the same port to tunnel to the same server, otherwise, with the default ssh configuration, you will be warned of a "Man in the middle attack" because the signature saved in the .ssh/known_hosts will not match with the previous one. This can be avoided by disabling this feature but I wouldn't recommend it.
I've followed several sets of instructions, including an online recorded lecture, that show just copying the dvwa folder to /opt/lampp/htdocs and visiting localhost/dvwa in the browser with Xampp services started. I've attempted this, but this is the screen I get (instead of the DVWA page prompting me to log in and set up the database).
What could the problem be? Has anyone run into this before? I've reattempted the instructions on this virtual computer and on my windows 10 host over the past few days and cannot get past this, even the slightest bit of advice would be incredibly appreciated.
Allow the usage of custom virtual hosts
By default, xampp in ubuntu won't use the httpd-vhosts.conf file (the location of the virtual hosts), therefore we need to indicate that this file will be included during the runtime of apache. Open with your favorite code editor the httpd.conf file located tipically in /opt/lampp/etc or just execute the following command in your terminal to open a simple editor:
sudo gedit /opt/lampp/etc/httpd.conf
Now locate yourself in (about) the line 487 where you probably will find the following lines:
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
As you can see, the Include statement that includes the httpd-vhosts.conf file is commented. Proceed to modify the line uncommenting that line:
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
And you're ready to configure your custom vhost.
Create a custom domain in the hosts file of your system
You need to create a custom domain where our apache virtual host will point to. This domain will be normally an ip (127.0.0.xx based) and a custom name.
To start, edit the hosts file located in /etc using your favorite code editor, or just by executing the following command in the terminal:
sudo gedit /etc/hosts
And proceed to add your custom host. In this example, our ip will be 127.0.0.3 and the domain myawesomeproject. So finally, our hosts file will look like:
Save the file, and now the domain myawesomeproject is an alias for the local address 127.0.0.5.
Create your first virtual host
Tipically, you need to create the virtual host in the httpd-vhosts.conf file located in /opt/lampp/etc/extra. Use your favorite editor to edit that file or just execute the following command to edit it in a terminal:
sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf
And create your own virtual host in this file. As shown in our custom domain in the vhost file of the system, the port that we are going to use is 127.0.0.5, therefore our virtual host will be:
<VirtualHost 127.0.0.5:80>
DocumentRoot "/opt/lampp/htdocs/my-first-project"
DirectoryIndex index.php
Options All
AllowOverride All
Require all granted
The deep and custom configuration of your VirtualHost is up to you. Save the file, and you're ready to test it.
Test your virtual host
To test it, in the folder /opt/lampp/htdocs/my-first-project, create a simple PHP file
(index.php) that will contain the following PHP code:
Start apache, mysql (entire XAMPP) using the following command (or whatever the way you start apache and the other required services):
sudo /opt/lampp/lampp start
Navigate in your favorite browser to http://myawesomeproject/ or http://127.0.0.5/ and you should get as output "Hello World" in the browser.
Ive got 4 dev VMs for four projects (all VMware Player VMs w/ubuntu 15.04 host) where each is running VNC (ports 5900, 5901, 5902, 5903) respectively.
I downloaded noVNC and saved to /var/www/html (my apache2 server on same host). Based on the ReadMe I then ran on my terminal
./utils/launch.sh --vnc localhost:5900
I received a missing websockify error, so downloaded it and placed it into the util folder. I then ran the same command and it worked! The terminal told me to Navigate to a url and sure enough I could control my VM.
However -- I'm wondering how can I use noVnc to access all 4 VM's? Is there some simple way to extend the port to a range like in iptables or firewalld?
./utils/launch.sh --vnc localhost:5900-5903
Okay, Ill answer for myself here in case it helps someone in the future...
First, create a token file where each line has a nickname, ip address, and port.
I created a file named token.list where each line looks like:
localhostnickname1: localhost:5900
localhostnickname2: localhost:5901
...
Then I use my terminal to go into the websockify folder so I can see the run file. I issue it the command:
./run --web /path/to/noVNC --target-config /path/to/token.list localhost:6080
Finally, I open my web browser and go to :
http://localhost:6080/vnc_auto.html?path=?token=localhostnickname1
Where localhost1 is the nickname of my first server on the first line of token.list
This link was my reference. If you want to serve this outside of localhost -- change the parameter localhost:8060 from localhost to an IP
I just installed the postgresql (as it says on postgresql), server is running like charm, no problem at all.
I just tried(want) to change the default port (5432) to (9898).
First I just tried to do it by postgresql.conf file under /var/lib/pgsql/data/postgresql.conf.
I just remove the comment for port related line, and change it as port=9898, but there is a comment saying overriding port here doesn't change anything for RHEL and deriven guys, it also says try to override the port config by service config file(cannot find it, where is it?).
I also change the postmaster.opts too (doesn't work the same).
Finally! how may I change the Postgresql 9.2.7 port number on CentOS 7?
Finally I found it, the service file is /lib/systemd/system/postgresql.service, I just change the following line.
Environment=PGPORT=9898
stop the service as
service postgresql stop
then reload the daemon services using this
systemctl daemon-reload
Finally start the postgresql using
service postgresql start
Now it's working like charm :D
Login to psql. Try
show config_file ;
That is the file you should change. Did you restart the server after changing the port?
You can also try the file under /etc/rc.d/init.d for PostgreSQL if it is running as a service.
From /lib/systemd/system/postgresql.service
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. If you want to customize, the
# best way is to create a file "/etc/systemd/system/postgresql.service",
# containing
# .include /lib/systemd/system/postgresql.service
# ...make your changes here...
# For more info about custom unit files, see
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
# For example, if you want to change the server's port number to 5433,
# create a file named "/etc/systemd/system/postgresql.service" containing:
# .include /lib/systemd/system/postgresql.service
# [Service]
# Environment=PGPORT=5433
# This will override the setting appearing below.
I think it is better to follow the steps above.
I am using Amazon EC2 instance with Amazon Linux AMI release ( A kind of CentOS it seems). I needed to change PGPORT variable in /etc/init.d/postgresql file and restart the postgresql service using 'service postgresql restart'. And it works!!
PGPORT=some_new_port # /etc/init.d/postgresql
What is purpose of "wgetrc" in the below commands.
-sh-3.00$ WGETRC=/hom1/spyga/spp/wgetrc_local wget --directory-prefix=/home1/spyga/spp/download ftp://127.0.0.1/outgoing/DATA.ZIP
wgetrc_local files having the credentials of ftp server.
normally i am downloading the files from ftp server using below command.
-sh-3.00$ wget --ftp-user=xyz--ftp-password=12345 ftp://localhost/outgoing/DATA.ZIP
what is the different between above commands.
Please help me out to understand the commands.
Thanks you.
The first command simply specifies an alternative configuration file to use instead of the default ~/.wgetrc. You could also specify it using --config=/hom1/spyga/spp/wgetrc_local as argument to wget.
This file can contain wgetrc commands that change the behaviour of wget. In this case it's probably done so user and passwords don't have to be supplied on the command line. Specially on multiuser systems it is a security risk to pass passwords on the command line, as that can possibly be viewd by other users, so it's a little better to store them in a file with restricted access permissions instead. This way only processes started by the owner of the file can access it.
Another use of the wget startup file is to change it's default settings, user agent etc...
It's all documented here.