LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-04-2015, 05:14 AM   #1
Shakin_Aleksey
LQ Newbie
 
Registered: Feb 2011
Posts: 15

Rep: Reputation: 1
iptables and vpn access


Hi!

I try to access a VPN server on the Internet from a host on a local network with a linux router to the Internet. My attempts have failed and I used tcpdump on the router to try and find the problem. It gave the following result:
There are two net interfaces on the router - eth0 - the local net, and eth1 - the Internet. When I try to access the VPN server I see the outgoing packets on both net interfaces, but incoming packets (the server's reply) I can see only on eth1.
iptables allows forwarding for local net without any restrictions:
-A FORWARD -s 192.168.2.0/24 -j ACCEPT
and it works for other services.
Could anybody tell me the nature of the problem and a possible solution, please?
 
Old 06-04-2015, 09:58 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Use stateful rules instead of connection rules.

In other word try the following;

Code:
-A FORWARD -i eth0 -m conntrack --ctstate NEW -s 192.168.2.0/24 -j ACCEPT
-A FORWARD -i eth1 -m conntrack --ctstate ESTABLISHED,RELATRED -j ACCEPT
 
1 members found this post helpful.
Old 06-05-2015, 01:13 AM   #3
Shakin_Aleksey
LQ Newbie
 
Registered: Feb 2011
Posts: 15

Original Poster
Rep: Reputation: 1
Yeah! It seams that's it. Thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Iptables to access VPN behind NAT abinf Linux - Networking 1 10-02-2009 08:28 PM
VPN pptpd connected vpn server only access need help please u4david Linux - Networking 1 10-17-2008 03:54 PM
MS VPN access through iptables. ashwin_think Linux - Networking 2 10-12-2008 11:03 PM
IPTABLES Interet access / VPN access vlady_s Linux - Newbie 2 01-24-2008 08:12 PM
How to access VPN + LAN in iptables Firewall pradeepjagtap Linux - Security 4 10-24-2006 12:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration