Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm a newbie when it comes to IPTABLES, so I hope someone can help me with this one. Our office firewall (Red Hat 8.0, IPTABLES) allows our people to VPN (using PPTP) to access work files. However now we have a few people that want to occassionally create a PPTP connection to another office. I have tried everything I can think of, but can not create a PPTP connection from behind our firewall. Any ideas?
Just to let you know, you've set your default policies to accept which is generally not a good idea. You generally set the policy to either DROP or DENY, and then explicitly ACCEPT your services(which you're doing redundantly anyways). Anywho -- you might try adding:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
This makes your firewall stateful. Roughly explained as follows:
Using a concrete example of a machine behind your firewall(A) trying to ssh out to a machine on the internet(B):
A sends a packet to tell B that it's about to make a connection(SYN)
B sends a packet back to A to say it got that packet(ACK) - A RELATED packet to the one above
A sends a packet to B to say I have received your receipt - A RELATED packet to the one above
B sends a packet to A to say I have received your receipt of my receipt, please send further data on port XXX (your socket is now ESTABLISHED)
A sends all further data to port XXX and the ssh session commences.
PPTP is no different than SSH traffic, what I think is happening on your firewall is that the RELATED and ESTABLISHED packets are being dropped(or more accurately ignored since you didn't specify what to do with them). Your firewall has not related them to an existing connection behind the firewall so it assumes they are brand new connections coming in and are subject to all the rules of your firewall.
Thanks a lot for your help. I decided to start from scratch and take your advice as well as research iptables more, and I have successfully created a ruleset that allows the VPN traffic.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.