Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by Molix · Apr 29, 2011 at 02:03 PM · linuxcrossdomainsecuritypolicysecuritysandbox

How to serve security policy on linux system?

Unity ships sockpol.exe for Windows, and that can be run on Mac with "mono sockpol.exe", but Linux servers are omitted. Presumably they figured if you ran a Linux server you'd know how to do it. Well I didn't, and couldn't find it, so I'm going to answer my own question, because I think it will be useful, and would love it if someone had a better idea.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Molix · Apr 29, 2011 at 02:11 PM

You can use netcat (a.k.a. nc) to listen on a socket and respond to requests. Basically you just create a script that pipes an echo of the domain policy to nc. e.g., create a text file that will be your script, say, domainPolicyServer.sh:

#!/bin/sh
while true; do echo '<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="1-65536"/>
</cross-domain-policy>' | netcat -l 843; done

You'll need to make it executable, and you'll probably want to make sure no one messes with it, e.g.

chmod 700 domainPolicyServer.sh

You can then start that with:

/path/to/file/domainPolicyServer.sh > /dev/null &

That will start it in the background and keep it quiet.

You can also add that command to your /etc/rc.local to ensure it is started at boot up.

This works, but I'm no Linux guru, so feedback is welcome.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Joshua · Apr 29, 2011 at 02:44 PM 0
Share

Not really useful to me atm, but upvote for sharing your knowledge/experience with the community!

avatar image attiksystem · Nov 15, 2012 at 04:22 PM 0
Share

Hi, thanks! $$anonymous$$aybe it's due to a different "netcat" I have under Debian Squeeze, but I had to change your script slightly to make it work: I used "netcat -l -p 843" ins$$anonymous$$d of "netcat -l 843".

avatar image ClemensTolboom · Jan 28, 2015 at 09:02 AM 0
Share

After adding the -p option the script works. Awesome.

@molix please add a remark in your answer.

avatar image
0

Answer by AdrianJF · Sep 29, 2015 at 03:28 PM

There is an issue with this script becoming unresponsive and stopping responding to tcp requests. The script is still running but with no clue to why it's not responding.,There is an issue with this script becoming unresponsive and stopping reponding to tcp requests. The script is still running but with no clue to why it's not responding.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dm_bond · Oct 06, 2015 at 01:07 AM 1
Share

try -d switch http://siderite.blogspot.com/2010/03/using-netcat-nc-running-in-background.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Security Policy works with WWW but not with PrefetchSocketPolicy on web port? 1 Answer

Cross-domain policy for specific folder/URL 1 Answer

Security.PrefetchSocketPolicy problem. 0 Answers

Web Player connection issue. 0 Answers

Why not Linux? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges