# Logstash configuration issue in VPN server

**URL:** <https://discuss.elastic.co/t/logstash-configuration-issue-in-vpn-server/161017>\
**Category:** Logstash\
**Created:** [December 16, 2018, 8:50am UTC](https://discuss.elastic.co/t/logstash-configuration-issue-in-vpn-server/161017 "2018-12-16T08:50:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [December 16, 2018, 8:50am UTC](https://discuss.elastic.co/t/logstash-configuration-issue-in-vpn-server/161017/1 "2018-12-16T08:50:25Z")

</div>

I have a project in ( **A.B.C.D** server). it is fetching data from third-party API. Now I want to store this data to my ES which is on a different server( **P.L.M.N** server). ELK server is connected with VPN ( openVPN ) and its IP address **W.X.Y.Z**. Now I am creating logtsash json file on my server. but failed to create the with json file with logstash conf file which is in VPN.

 ![vpnlog](https://us1.discourse-cdn.com/elastic/original/3X/0/a/0a5f930e22ba3f727e7999112d8824d1e585c605.png)

in my localhost, I can do everything but need help with this. unable to write the proper conf file I guess.

My logstash conf file sample

```
input {
	file {
		path => "/etc/logstash/review_data.json"
		start_position => "beginning"
		sincedb_path => "/dev/null"
		codec => "json"        
	}
}

filter {
	json {
		source => "message"
	} 
}

output {
	#stdout { codec => rubydebug }
	elasticsearch {
		hosts => ["http://P.L.M.N:9200/"] 
		index => "data_student"
		document_id => "%{id}"
		template =>"/etc/logstash/review_template.json"
		template_name=>"tem_student"
		template_overwrite => true
	}
}

```

thanks @inandi

---

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [December 19, 2018, 5:29am UTC](https://discuss.elastic.co/t/logstash-configuration-issue-in-vpn-server/161017/2 "2018-12-19T05:29:20Z")

</div>

I have installed Logstash on my project server and I can connect my project to ELK and send-receive data. The problem is with VPN only. So I think this problem is no more related to this forum. Still, if u get anything before it gets closed please feel free to post any suggestions.

Thanks @inandi

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 16, 2019, 5:29am UTC](https://discuss.elastic.co/t/logstash-configuration-issue-in-vpn-server/161017/3 "2019-01-16T05:29:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
