Multiple Applications Using Different Ports Not Running In Flask

I am working on a project including text chat, video chat, and file transfer parallely using different ports in python. I am able to achieve this simply using threads in python and making a window with tkinter. But now, I want to put all this on a webpage. I am using flask for that. The problem here is:- flask uses a single port to run an application. How to host all the applications with different ports on a single webpage(threading gives me "address already defined error" error)?


Similar Content



How To Host Multiple Websites On Different Ip And Different Ports On Apache Webserver

How to host multiple websites on different ip and different ports On Apache webserver in Centos 5.4.
First I made two domain on two IP :192.168.1.104 and second virtual ip 192.168.1.105.
Open the httpd.conf file and assisn two ports and two ports
vi /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.1.104:8139
NameVirtualHost 192.168.1.105:8080
<VirtualHost 192.168.1.104:8139>
DocumnetRoot /home/xyz/
serverName xyz.in
</VirtualHost>

<VirtualHost 192.168.1.105:8080>
DocumnetRoot /home/abc/
serverName abc.in
</VirtualHost>

service httpd restart
service dns restart
First One I am getting the website opened but not the second one
Please help me .I can host the website on same ip and different port but unable to host the website on different ip and different port.
DNS is working fine

Newbie With A PCI To Parallel Card Problem

I'm a newbie with a Linux box running Ubuntu 10.04 that I'm attempting to setup to control a desktop CNC. The box didn't have a parallel port so I purchased a SYBA PCI to Parallel card. Following the instructions from the card I ran "lspci -v" and below is what it showed;

03:00.0 Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic Device 0010
Flags: medium devsel, IRQ 19
I/O ports at ec00 [size=8]
I/O ports at e880 [size=8]
I/O ports at e800 [size=8]
I/O ports at e480 [size=8]
I/O ports at e400 [size=8]
I/O ports at e080 [size=16]
Kernel modules: parport_serial

The instruction stated to use the following command;

/sbin/modprobe parport_pc io=e080, irq=19 If I read the instructions correctly.

Unfortunately, the instructions didn't say where to add this command line. Also I didn't see any drivers listed on the disk for the chipset referenced above. So is the card trying to use a generic driver installed by Linux?

Your guidance is greatly appreciated!!
Thank you Brian

How To Identify An Ephemeral Port

Hi all,

I understand that Linux by default will limit its Ephemeral port allocation between 32768 to 61000.

I need to identify the applications running on my box (around 500 of them) which are intentionally using a port which happens to be in Ephemeral port range. Objective is to get a list of those apps and flag it so that the developers get to know of it and change their application port.

When I run netstat -nap to get a list of listen ports, I am unable to figure out if the port in Ephemeral range is actually allocated by OS or one of my apps has done it.


Thanks,
linux_it_is

Python FTP Send Command

hello Experts!
need some help here with python FTP. so what i'm trying to do is, from a linux machine, ill be sending over a python script to a windows machine via python ftp. that works fine with no problem. now, i want to execute that python script i sent remotely. im having trouble with that. here's my code to just execute the script:

p.s : please dont suggest other options such as python paramiko due to many network security reasons

Code:
ftp = ftplib.FTP("windows machine name")
ftp.login("username", "password")
ftp.cwd("where\\python\\script\\is kept\\")

ftp.sendcmd("python myscript.py")

but looks like it doesn't recognize that command. how do i accomplish this please?

Firewall Setup


I have an Intel x86_64 system running rhel 7.0 I want to use this system as a Firewall. The system has two NICs. one NIC is defined with the static IP address from my ISP. The other NIC is also static i.e. no dhcp, and is assigned a LAN addrs of 192.168.10.6 It is plugged into a switch (192.168.10.1) that has other three devices plugged in. Each with it's own hard-coded LAN address (Netmask is 255.255.255.0) I have two zones active in the firewall config External (using the static ip from the ISP) and Internal (using the IP addrs of 192.168.10.6) I'm forwarding the following two ports 80 & 443 in both zones. External zone: ports 80 & 443 are forwarded to my switch (192.168.10.1) Internal zone: ports 80 & 443 are forwarded to my static IP addrs from my ISP. I have IP masquerading turned on in the External zones. However none of the other workstations (Windows 7 professional) and my "smart" TV (netflix access) are able to access the internet. Again I'm NOT using any dhcp, all IP addresses are hard coded. I can ping any LAN address from any LAN node. The Linux FW machine can access the internet. I've read thru the RHEL 7.0 Security guide regarding setting up the firewall and I believe I have all the elements defined properly ... It just doesn't work. I have the same set of DNS values defined on all systems.
They are the three DNS servers assigned by my ISP. I have ipv4 forwarding active on my Linux system. I have masquerading "turned on" in the External zone. The resolv.conf file has the ip addresses of the DNS servers as well as my switch.
However the windows 7 systems and my "smart" TV cannot access the internet.
Anyone who's really familiar with rhel firewall-config GUI and has any suggestions please respond.
Thanks
Guy

Permission Denied When Trying To Execute An Application On A SD Card

Hi,
I made some little applications with qt creator and i wanted to run them on an embedded linux board (linux 2.6.24). To transfer the files i use a SD card. If i move the applications to "/bin" after having mounted the SD card and then "chmod a+x" them then i have no problem running them.
But if i mount the SD card and try to run the applications directly in the folder where i mount it i have an error : "Permission denied". Also when using the command "ls" i notice that if i keep the files in the mounting folder and try to "chmod a+x" them, the modification don't happen. They stay "greyed" and don't go "green". (I don't know if this color code is a standart for linux terminal but maybe this could help you understand the problem).
When mounting the SD card i use the command :
Code:
mount -t vfat /dev/mmcblk0p1 /mnt/SD

So the files are located in /mnt/SD.

Am i missing something or is it not possible to run something like that ?

EDIT :
I tried "mount -t vfat -o umask=0000 /dev/mmcblk0p1 /mnt/SD" to chnage how i am mounting the SD card.

Still "Permission Denied".

With "ls -l" i can see that the permissions are staying :
-rw-rw-rw-

Even if i try something like "chmod 777".

It seems to be a problem related to the fact that the sd card is formated as fat32 but it must stay like that.

Trouble Configuring Vsftp

Using a Raspberry Pi w/ Debian

Read the manual and several "how-to"s and am getting nowhere

vsftp is running and making a log file. I can get to the Pi with putty or SAMBA

Ultimately want to be able to both(I) ftp in under the "pi" user to access files remotely and (II) have people sending me huge files ftp them in anonymously

Have tried (I) the ftp client in Windows 7 Internet explorer 11, (ii) the ftp client in the Windows 7 "map network drive" UI, and (iii) ES file explorer on my Android phone.

The android phone tells me there is no server there. Windows 7 gets no password challenge, gives no error indication, but does nothing useful. The vsftpd log file shows some attempt by the Windows machine, nothing for the Android.

Config file and log file attached.

The Android is trying to use port 21, the config file mentions something about port 20. Which ports do I need to forward in my router to enable remote access?

Any help appreciated.

Thanks. Jonathan

Debian / Python SSL Error?

I have just installed Debian "jessie" as well as Python 2.7.9. I have all the OpenSSL packages and I thought everything was working fine until I tried to hit the server using a browser (Chrome) and https://; Once I did that I got this error message on the server end, and ideas on how to resolve this would be great.

Incoming web connection from ('192.168.15.177', 53202)
error: uncaptured python exception, closing channel <main.AlarmServer listening :8111 at 0x75ea7b48> (:certfile must be specified for server-side operations [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|443] [./alarmserver.py|handle_accept|456] [/usr/lib/python2.7/ssl.py|wrap_socket|891] [/usr/lib/python2.7/ssl.py|init|498])

SQUID NOT ALLOWING BROWSING FOR SECURED CONNECTION

SIR

I HAVE RECENTLY INSTALLED CENTOS7 AND CONFIGURED SQUID ON IT . I AM FACING A TYPICAL PROBLEM I AM ABLE TO BROWSE THE NORMAL PAGES BUT WHEN ANY PAGE THAT STARTS WITH HTTPS:\\ IS NOT ALLOWED TO BROWSE.
I HAVE CHECKED MY SQUID.CONF FILE BUT AM UNABLE TO FIND THE PROBLEM.
I HAVE DISABLE SELINEX AND THERE ARE NO RULES IN IPTABLES ALSO.

KINDLY HELP

PASTING MY SQUID.CONF FILE

#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl all src all
#acl manager proto cache_object
#acl localhost 127.0.0.1/32
#acl to_localhost dst 127.0.0.0/8 0.0.0.0/32

acl localnet src 191.254.178.0/24 191.254.28.0/24 10.0.43.0/24 10.0.42.0/24
http_access allow localnet
icp_access allow all

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
#http_access allow localhost manager
http_access allow localnet manager
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all


# Squid normally listens to port 3128
http_port 8899

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

cache_peer 191.254.178.76 parent 3128 0 no-query no-digest
#icp_access allow all

#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp: 1440 20 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

Can't Transfer Photos From Camera To Computer

Running Xubuntu 14.10 (and out of patience). Got a Nikon Coolpix L15 and hooked it up to my Dell Optiplex 170L via a USB cord. The camera icon pops up. I double click on it and get to the photos, but then the whole thing starts bogging down and I can't copy the photos and something crashes. (Not the whole computer.) I'll attach the report. (It's in two screenshots because it didn't fit in one.)

And when it bogged it also gave me an error message window with 'One or more applications are keeping the volume busy. (PID-0)'

And I thought it was kind of treating the camera as a usb drive. When I hovered the cursor over the camera icon it showed:

'Mounted in "gphoto2://[usb:004,002]/"

and it showed:

0 bytes left (0 bytes total)

And there was four photos and a video on the camera.

I checked and was able to download the photos and video on a Windows computer, so I don't think the issue is with the camera or the files.

Because of the 'volume busy' error message I closed out everything on the computer and was still getting the same messages when I tried to transfer.

It seems close to doing it. I can highlight a photo but then it all bogs down and crashes.