I am setting up a VPS with thirtybees and I need to send out confirmation emails,etc...
To send emails, I've been setting up postfix with the following commands:
sudo apt-get install postfix
followed by
service postfix start
and then trying to test it out with
echo “test” | mail -s “Test mail “ myemail#gmail.com
I receive nothing.
I have a domain pointing out at my VPS IP and the confing in main.cf seems to be alright.
I have tried to follow multiple tutorials over the internet but none has worked so far, some suggesting to modify main.cf domains in different ways, none have worked so far.
Related
I need to spin up a TURN/STUN server in Cloud. I feel it a pretty common use case and there are hundreds of related posts in the internet. After several days of failed attempt, I still failed to spin it up.
Here is my current step. I keep it simple to be reproduced (only take ~10mins). I've no idea which part could go wrong.
1. Launch an (Amazon Linux 2.0 , t2.micro) host
allow ALL traffic in SecurityGroup (only for quick test, remember to
delete the rule)
put it in public Subnet in default VPC grant it
public IP address.
2. ssh into the host run following commands
sudo yum -y update
sudo amazon-linux-extras install epel
sudo yum -y install coturn
3. start server
export PRIVATE_IP=172.31.28.133
export PUBLIC_IP=34.222.45.31
sudo turnserver -n --listening-port 3478 --listening-ip ${PRIVATE_IP} \
--relay-ip ${PRIVATE_IP} --external-ip ${PUBLIC_IP} \
--allow-loopback-peers --no-auth --no-tlsv1 --no-tlsv1_1 \
--log-file /tmp/turnserver.log --simple-log --fingerprint \
--min-port=49152 --max-port=65535 --verbose --no-cli
Now we will be able to see server up and running in 3478 port (default turn server port)
But this server is not running functional, there are a few problems with it:
ssh the host in new tab, run curl localhost:3478, it will respond: curl: (56) Recv failure: Connection reset by peer (Expect to see default "TURN Server" html page)
from random machine (not within the VPC), run curl <EC2ExternalIpAddress>:3478, it has no response, not even Recv failure message
trickle ICE shows "TURN server not reachable"
What could be problem with it?
I'm working on a project that is email-intensive and I appreciate that the emails land in mailhog on DDEV, but I want to see them in gmail, Outlook, etc. How can I get them to where I want to look at them? (I use ddev launch -m to launch the mailhog browser in ddev; docs are at https://ddev.readthedocs.io/en/latest/users/developer-tools/#email-capture-and-review
This isn't too hard to do, it's just that Mailhog's debug/error output isn't captured or presented by ddev, so it requires a bit of effort to get it working.
You need an smtp server that will accept regular SMTP traffic. These days, it will require a username and password. I used mailgun (https://www.mailgun.com/), which is free but requires a credit card. I'll assume you have this set up.
You need to be able to see the output from Mailhog as it tries to "release" the email. We'll use a ddev custom command to solve this.
Step by step:
Install this custom command to be able to see the output of mailhog. Put it in .ddev/commands/web/mailhog-debug and make sure it's executable (chmod +x .ddev/commands/web/mailhog-debug).
#!/bin/bash
## Description: capture debug from mailhog
## Usage: mailhog-debug
## Example: "ddev mailhog-debug"
set -eu -o pipefail
echo "mailhog on project d8composer"
sudo rm -f /etc/supervisor/conf.d/mailhog.conf # Remove mailhog from supervisor conf
kill -1 1 # Tell supervisord to reload
killall mailhog || true
mailhog
Send a message. This can be with the project's contact page or whatever your application is doing.
View the message in Mailhog (use ddev launch -m to launch the Mailhog interface).
Use the "Release" button to release the message into the wild:
Enable mailhog debugging, ddev mailhog-debug - it will keep going until you
On the "release" form, you need to give it the credentials that you're going to use. You can click the "Save these settings" checkbox... but you must leave it unchecked the next time you are here or Mailhog will throw away your message saying it's already created that server.
Click "Release message" and watch the debugging go by in your terminal window. If you're like me you'll have a few authentication failures before you get it right.
Enjoy looking at the email at the target email address.
I am trying follow the steps of Composer Playground tutorial for local version of the playground and using local fabric peer.
I have done prescribed sequence of steps: downloadFabric.sh, startFabric.sh, createPeerAdminCard.sh. Once I bring up the playground, I can see network card PeerAdmin#hlfv1 showing no business network attached to it.
Then I click on Deploy a New Business Network, and select "vehicles-lifecycle-network" example. The dialog looks similar to the one in tutorial, but it has additional fields asking for credentials for network administrator, and I am not sure what to put there.
I tried copying in key and certificate that were generated by createPeerAdminCard script, and I also tried using ID and Secret option putting in PeerAdmin or PeerAdmin#hlfv1. I found this answer which indicates that it does not matter what secret you specify as the user is already imported into the keystore -- not sure if it is relevant. It certainly did not make any difference.
When I click deploy, the new network seems to appear in the composer dashboard. However, if I click on "Connect Now", a popup shows "Error trying to login and get user context" and [[{"code":400,"message":"Authorization Failure"}]].
It seems I am missing something very basic, but cannot really figure it out on my own.
Edit:
Simple steps to reproduce (assuming basic-sample-network.bna is available locally):
> composer runtime install -c PeerAdmin#hlfv1 -n basic-sample-network
> composer network start -a <path to basic-sample-network.bna> -A admin -c PeerAdmin#hlfv1 -C <path to PeerAdmin certificate> -f admin.card
> composer card import -f admin.card
> composer network ping -c admin#basic-sample-network
Last command produces the same error as above in the console.
Edit 2:
If I open up ~/.composer/cards/PeerAdmin#hlfv1/metadata.json and add "businessNetwork":"basic-sample-network" parameter, I am able to do composer network ping -c PeerAdmin#hlfv1 successfully, and also can connect to the network from the Playground -- this will do as a workaround for now. However, I must be doing something wrong with the way I create new network and its admin card.
The Playground Tutorial assumes that you are connecting to an Online Hosted Playground hosted on IBM Cloud (Bluemix). For the Online Playground the underlying Fabric is 'Web' - i.e. the Fabric is stored only in the local browser. This document may help explain the different Fabric Runtimes: Typical Solution Architecture
The Local Playground gives you the additional option of deploying a Business Network to an hlfv1 Fabric, using the PeerAdmin card that you created with the createPeerAdmin.sh script.
After creating the PeerAdmin card you should be able to start Playground locally with the composer-playground command and you should be able to deploy a Business Network. In this development scenario the Credentials for the Network Administrator should be Id and Secret specifying admin / adminpw. There is no need to run CLI commands prior to starting local playground. (createPeerAdminCard.sh is not a CLI command but is a Dev environment setup script - and it should be run.)
If you want to go down the CLI route please see the Developer Tutorial
I have dedicated server with cent-os and proxmox ve. Also made virtual machine with centos 6 and centos webpanel in proxmox. From last four month I'm using this and everything is working properly mean I'm able to open mysite:2030 (admin panel). But from today morning, it is not opening, I don't know why is this happening. But I'm able to access all files through ftp(21) and also able to access sftp(22). Please help me configuring it so I will able to open admin panel(Control Panel).Thanks. I asked this question on https://serverfault.com/ but still have no reply, so I asked here.
Did you try to look at your iptables rules?
As far as I know, centOS blocks everything, allowing only the ports present in the rules in the iptables.
After trying so many methods I searched on net related iptables, I got one best solution, now everything is working like a charm. And applied below command with root access using putty.
1)First I tried this commands:
iptables -A INPUT -p tcp --dport 2030 -j ACCEPT //press enter
service iptables restart //press enter
2)then below commands:
iptables -I OUTPUT -p tcp --dport 2030 -j ACCEPT //enter
/etc/init.d/iptables stop //enter
/etc/init.d/iptables start //enter
reboot //rebooted server
I just figured how to connect to my webhost with PuTTy .
But how to I connect to my localhost? I put
Servername: localhost
port: 22 (I've tried 80 too)
And it gives me an error "failed to connect"
How do I connect?
If you are using Cygwin on your local host, you can connect to Cygwin's sshd (SSH Daemon).
3 easy commands to install the sshd as a service: (always there when you startup the machine)
$ ssh-host-config -y # enable sshd. "-y" answers yes to all queries.
$ cygrunsrv --start sshd # start it as an autostart Windows service
$ ssh localhost # try to recursively log in via ssh
Taken from: http://nfnaaron.posterous.com/tag/puttycyg#Section2
(The second approach)
=> You get the entire ssh infrastructure: public key authentication, ssh-agent, etc...
Ensure that you have running a SSH server (such as openssh-server) running on localhost and not just a web server (such as apache). Also ensure, that localhost is really mapping to 127.0.0.0/8
The solution in the answer above won't work unless you have installed Cygwin with the OpenSSH package selected - you have to do this manually during the installation process (see option a below).
Depending on the intended purpose of your connection you can try one of the options below, option (b) being much easier to install but lacking the *nix shell capabilities.
a. You can install a Cygwin shell with ssh server, this site (http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html) has instructions for Windows Server but they work for other Windows too with may be some of the questions shown in the output on the page not appearing on non-server version of Windows. Also, where it says in the instructions to issue the command:
mount -s --change-cygdrive-prefix /
delete the -s option so that the command is
mount --change-cygdrive-prefix /
(at least this was the case for me on Windows 7).
b. PuTTy site suggests WinSSHD (http://www.bitvise.com/winsshd-download). It's an easy self-installer. Once it's up you have to click onthe StartSSHD link about 1/3rd of the screen down on the first page of the config window. Then you can connect your PuTTy to localhost. However, in my experience, it didn't provide any *nix command support, only the native Windows ones and I couldn't find anything in their user guide on this.
Hope this helps.
Just adding this answer in case anyone is still looking for a solution.
In your hostname (or IP address) section, enter localhost or 127.0.0.1
Leave the port to its default value 22
Click on open
Now a login shell will popup -
Log in as your username, your username is basically what you get when you type whoami in your Terminal.
In the password section, type the password that you use as your system's password.
The above steps should connect localhost with ssh(PuTTY)