LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-01-2014, 08:38 PM   #1
trieu1929
LQ Newbie
 
Registered: Jul 2014
Posts: 15

Rep: Reputation: Disabled
set rules for OpenVPN in iptables


Postby trieu1929 » 2014/07/01 07:17:30
Firewall (FW): three leg (eth0: 172.16.1.101; eth1:192.168.99.99 (LAN), eth2:10.0.0.1 (DMZ)) and I installed openvpn in FW by tunnel mode, already ok : tun0:192.168.10.0/24. If I use shorewall+squid proxy firewall is ok, At beside can connect to FW, LAN, DMZ using my company services.
Now, I want to use iptables rules + squid proxy. What do I set rules for openvpn?
And I have set rules below but not connect to server firewall installed openvpn:
net.ipv4.ip_forward = 1

Code: Select all
iptables -A INPUT -i eth0 -m state --state NEW -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth0 -j MASQUERADE
iptables -A OUTPUT -o tun+ -j ACCEPT

Help me set rules for openVPN! Thanks very much!
 
Old 07-03-2014, 11:48 PM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
http://www.linuxquestions.org/questi...-is-up-886193/
 
  


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 permanently set iptables rules austinramsay Slackware 12 10-13-2013 11:29 AM
Problems with iptables > Rules set but not working effektive tiuz Linux - Security 5 08-28-2013 02:55 PM
iptables forward rules for OpenVPN & PPTP crspy Linux - Networking 2 04-18-2013 02:12 AM
configuring openvpn with iptables rules (internet connection freezes when tun0 is up) BlackHawk Linux - Networking 11 06-22-2011 12:36 AM
Set iptables rules from Kernel Module saurabhchokshi Programming 5 05-01-2009 11:10 PM

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

All times are GMT -5. The time now is 04:55 AM.

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