Bind selenium to a specific IP - Possible?

anonymous-one picture anonymous-one · May 15, 2012 · Viewed 20.9k times · Source

Like many, we start selenium server via the following command:

java -jar selenium-server-standalone-2.21.0.jar

What we found is that this opens selenium up on 0.0.0.0:4444

Started SocketListener on 0.0.0.0:4444

[USER @ BOX ~]# netstat -na | grep LISTEN | grep 4444
tcp        0      0 :::4444                     :::*                        LISTEN

Is there any way to bind selenium to a specific ip (localhost)?

Thanks.

Answer

retornam picture retornam · May 16, 2012

Use the following command

    java -jar selenium-server-standalone-2.21.0.jar -host 192.168.1.100

where 192.168.1.100 is the IP address of the host