Change ip of a subscription domain on plesk12 - plesk

When I create a new subscription it uses a new ip and I'm not able to put to this new subscription one ip used in another subscription. Is not possible?

Yes, it's possible.
By default all new IP addresses has type "Dedicated", you can check and change it to "Shared" in Tools & Settings > IP Addresses > choose desired IP address

Related

How to set Ipv4 addresses with dbus-python (Hotspot and ethernet)

(fairly new to networking)
I'm trying to setup a small, yet somewhat complicated network settings on my ubuntu 18.04 machine.
The topology of the network: Ubuntu machine (called "the server") will act as the DHCP server for both hotspot and ethernet. connected to the ubuntu machine are 2 ubuntu machine clients and a camera.
I've implemented "the server" with python-dbus library, to set up/down a hotspot connection, which works as intended. but my problem is how to manage the ip addresses and the routing.
i'll elaborate on 2 problems i am facing:
in order to change the ipv4 address for the Hotspot AP, i found out i could edit a file: "/etc/NetworkManager/system-connections/", adding another line: "address1=X.Y.Z.W" (my desired ip address).
but editing the file isn't the proper way for my requirements, i would rather do it from the code itself. which changes do i need to make to the code in order to make the same changes?
this is how the code connection object of dbus looks like:
def get_hotspot_struct(iface, uuid, ssid, password):
s_con = dbus.Dictionary({
'type': '802-11-wireless',
'uuid': uuid,
'id': 'PixellotHotspot',
'interface-name': iface,
})
s_wifi = dbus.Dictionary({
'ssid': dbus.ByteArray(ssid.encode()),
'mode': 'ap',
'band': 'bg',
'channel': dbus.UInt32(1),
})
s_wsec = dbus.Dictionary({
'key-mgmt': 'wpa-psk',
'psk': password,
})
s_ipv4 = dbus.Dictionary({
'method': 'shared',
})
s_ipv6 = dbus.Dictionary({
'method': 'ignore',
})
con = dbus.Dictionary({
'connection': s_con,
'802-11-wireless': s_wifi,
'802-11-wireless-security': s_wsec,
'ipv4': s_ipv4,
'ipv6': s_ipv6,
})
logger.info('Getting hotspot connection template')
logger.info(con)
return con
Can i do the same for ethernet wired connections?
so far what ive figured is that I can edit "/etc/netplan/01-netconf.yaml" in order to set dhcp to false, and se an ip "X.Y.Z.W" (desired) for ethernet interface eth0.
but that seem to only work on the server, when i connect the ubuntu clients with ethernet wire to the server, the server wont give the clients any ip at all.
It does for the hotspot, but not for the ethernet.
I know my problem is very specific and all-over-the-place, but i would appreciate any help. Post here/sendme email/ Facebook me(Yves Halimi) if you have knowledge about this issue. Will compensate help!!
The D-Bus API is documented in man nm-settings-dbus.
To NetworkManager, it's always about creating connection profiles and activating them. So if you have code that can create one profile, another profile works basically the same -- just some keys will be different.
I find it helpful to use one of the other NetworkManager clients, and compare with what they do. For example, you could also just create the profile with nmcli connection add type ..., then get the D-Bus path via nmcli -f all connection show and finally, look at how the profiles looks on D-Bus:
busctl -j call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings/1 org.freedesktop.NetworkManager.Settings.Connection GetSettings
See examples upstream: python+dbus
Maybe you'll find it easier to use python + pygobject + libnm. In that case, see examples here. The main downside is that you'll have an additional dependency (pygobject). libnm isn't an additional dependency, you'll already have that if you use NetworkManager.

Sending to another user with e-mail address

I am trying to create a script in Python to transfer funds to another Coinbase user when all I have is an e-mail address. I have been unsuccessful so far. How do I get another user's "id" when all I have is their e-mail address?
As a follow on, can I add a memo/note to the transfer? If so, how?
Finally figured it out with a little bit more searching and trial and error. For anyone else who may have this question:
First get the account ID for the currency you want to send.
account_list = client.get_accounts()['data']
ETH_id = [acc['id'] for acc in account_list if acc['balance']['currency'] == "ETH"][0]
Then use the send_money function (not transfer_money) to send to an e-mail address.
client.send_money(ETH_id,to="<e-mail address>", amount="0.0005", currency="ETH", description = "Hey look, it worked.")
The description keyword is for the memo.

how to create a code for IP-address locator which takes IP-address from a table in database

I am working on a project that collects the Ip address of user and store them into a database.
I would like to know methods or ways i could track these ip's and produce their geographical latitude and longitude details.
I dont want to create a website or an app..i just want it to work locally on my system.
I don't think you could do directly in T-SQL However you could use CLR with C#
using (var objClient = new System.Net.WebClient())
{
var strFile = objClient.DownloadString("http://freegeoip.net/xml/192.168.0.1");
}
See question

Change Recipient Address Google Apps Script

Is it possible to change the recipient address when using the reply function in Google Apps Script?
I want to receive an email from a random email account, mark it with a label and when scheduled, run the following code to reply to a desired email address rather than the original sender. The reason I want to reply is to keep it in the same thread. I have tried nearly all variations of the following code and can't get it to work the way I want it to:
thread.reply("This is a message.", {
htmlBody: "This is a message.",
name: "My Name",
recipient: "DESIRED#EMAIL.com",
replyTo: "DESIRED#EMAIL.com",
to: "DESIRED#EMAIL.com"
});
If you're asking to generate a random email address and send a real email from that address... that's not possible.
However... you could set the replyTo optional parameter as a random address - though when users would try to reply to that thread they would get a bounce-back notification that the address could not be reached. However, the original sender (the non-random address) would still be visible in the original message.
If you look at the GmailApp docs (replying)/(sending), you'll notice a few limitations. The sender's address (from) must be a valid Alias, if you're sending mail from MailApp (Google Apps Script).
However, there are plenty of methods in the GmailMessage class such as getFrom() and getReplyTo() that would allow you to get/set the message's from/replyTo parameters and have them be the same value. That way, when you reply to a message you will always be in the same thread.

Target email address validiation

Before the client sends a new email, he/she specifies one or more (To) destination addresses. Is there any way to check the validity of these emails before sending the message ?
Define "validity".
This JavaMail FAQ entry might help.
The InternetAddress class only checks the syntax of the address. The InternetAddress class is not able to determine whether the address actually exists as a legal address. It is not even possible to verify the host name if the application is running behind a firewall or isn't currently connected to the Internet.

Resources