Created
October 16, 2013 09:39
-
-
Save vnys/7005232 to your computer and use it in GitHub Desktop.
Kjøre IntelliJ IDEA på flere maskiner samtidig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Kjøre IntelliJ IDEA på flere samtidig {#title} | |
| ============================================== | |
| Av Øystein Steimler og Victor Nystad | |
| Dersom du har både bærbar og stasjonær maskin med IntelliJ, støter du på **"This license is being used elsewhere in the network"**. Mekanismen bak dette, er en multicastg-gruppe som maskinen din meldes inn i hvor lisensnøkkelen din multikastes når intellij starter og nå og da mens den kjører. | |
| For å blokkere multikastmeldingene, kan du legge inn følgende brannmur-regler: | |
| * Dropp innkommende pakker til 230.0.0.3 | |
| * Dropp utgående pakker til 230.0.0.3 | |
| Det er mulig at intellij blir lei seg hvis man avviser pakkene istedet for å droppe dem, men det er en øvelse for leseren å finne ut av. | |
| Eksempler | |
| --------- | |
| ### Linux | |
| root@boba:~# iptables -A INPUT -d 230.0.0.3 -j DROP | |
| root@boba:~# iptables -A OUTPUT -d 230.0.0.3 -j DROP | |
| ### OS X | |
| jango:~ root# ipfw add drop ip from any to 230.0.0.3 | |
| Varige regler | |
| ------------- | |
| ### Linux | |
| For å få reglene til å vare, er det enkleste å legge inn et script i `/etc/network/if-pre-up.d` i linux. | |
| #!/bin/bash | |
| # | |
| # Drop multicast trafic to IntelliJ IDEA's peer-to-peer group. | |
| # | |
| iptables -D INPUT -d 230.0.0.3 -j DROP 2> /dev/null | |
| iptables -A INPUT -d 230.0.0.3 -j DROP | |
| iptables -D OUTPUT -d 230.0.0.3 -j DROP 2> /dev/null | |
| iptables -A OUTPUT -d 230.0.0.3 -j DROP | |
| ### Mac | |
| På mac legges følgende script i `/usr/local/sbin/` | |
| #!/bin/sh | |
| . /etc/rc.common | |
| ipfw add drop ip from any to 230.0.0.3 | |
| exit 0 | |
| #### Gjør scriptet kjørbart | |
| sudo cmod o+x CustomIPWFRules.sh | |
| #### plist | |
| Legg følgende plist-fil i `/Library/LaunchDaemons/` | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.api.ipfw</string> | |
| <key>ProgramArguments</key> | |
| <array><string>/usr/local/sbin/CustomIPWFRules.sh</string></array> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| </dict> | |
| </plist> | |
| #### Endre eier til root | |
| sudo chown root:wheel com.api.ipfw.plist | |
| #### Test at det funker | |
| sudo launchctl load -w com.api.ipfw.plist | |
| sudo launchctl start com.api.ipfw | |
| sudo ipfw show | |
| Hvis alt er <i class="icon-thumbs-up"></i> skal det nå stå | |
| 00100 0 0 deny ip from any to 230.0.0.3 | |
| > Written with [StackEdit](http://benweet.github.io/stackedit/). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adfa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment