LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-18-2004, 05:42 PM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Iptables troubles


I have setup a vpn between my home machine (SuSe Linux) and my office network (FreeeBSD). However, the vpn only works if I disable the firewall on my home machine.
When the firewall is active and I try to ping a host on my office network, I never get the ping replies, and I find many such lines in my /var/log/messages file:

Jul 18 22:46:47 linux kernel: SuSE-FW-ILLEGAL-TARGET IN=ppp1 OUT= MAC= SRC=192.168.229.1 DST=192.168.229.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=56225 DF PROTO=ICMP TYPE=0 CODE=0 ID=18198 SEQ=1

Some other details on my setup:
vpn method: ppp-over-ssh
interface to my ISP: ppp0
vpn interface: ppp1
local IP (ppp1): 192.168.229.2
remote IP (ppp1): 192.168.229.1

My firewall rules generated by SuSE Firewall2:
Output of "iptables -L":
Code:
Chain INPUT (policy DROP) 
target     prot opt source               destination 
ACCEPT     all  --  anywhere             anywhere 
LOG        all  --  loopback/8           anywhere         LOG level warning tcp-options ip-options prefix `SuSE-FW-DROP-ANTI-SPOOFING ' 
LOG        all  --  anywhere             loopback/8         LOG level warning tcp-options ip-options prefix `SuSE-FW-DROP-ANTI-SPOOFING ' 
DROP       all  --  loopback/8           anywhere 
DROP       all  --  anywhere             loopback/8 
LOG        all  --  anywhere             anywhere           LOG level warning tcp-options ip-options prefix `SuSE-FW-ILLEGAL-TARGET ' 
DROP       all  --  anywhere             anywhere  

Chain FORWARD (policy DROP) 
target     prot opt source               destination 
TCPMSS     tcp  --  anywhere             anywhere           tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU  

Chain OUTPUT (policy ACCEPT) 
target     prot opt source               destination 
ACCEPT     all  --  anywhere             anywhere 
LOG        icmp --  anywhere             anywhere           icmp time-exceeded LOG level warning tcp-options ip-options prefix `SuSE-FW-TRACEROUTE-ATTEMPT ' 
DROP       icmp --  anywhere             anywhere           icmp time-exceeded 
ACCEPT     icmp --  anywhere             anywhere           icmp fragmentation-needed 
ACCEPT     icmp --  anywhere             anywhere           icmp network-prohibited 
ACCEPT     icmp --  anywhere             anywhere           icmp host-prohibited 
ACCEPT     icmp --  anywhere             anywhere           icmp communication-prohibited 
DROP       icmp --  anywhere             anywhere           icmp destination-unreachable 
ACCEPT     all  --  anywhere             anywhere           state NEW,RELATED,ESTABLISHED 
LOG        all  --  anywhere             anywhere           LOG level warning tcp-options ip-options prefix `SuSE-FW-OUTPUT-ERROR '
Sure, iptables is something new to me (I am rather familiar with FreeBSD's ipfw), but I have been reading its howto for hours now, and I still cannot grasp why the ping replies (and any other traffic via the vpn) are dropped.
So far as I can judge based on the "SuSE-FW-ILLEGAL-TARGET" prefix in the logfile, the packages might be dropped by the last rule of the INPUT chain.
What I do not understand: How can those packages reach that rule, when they should match just the first (accept all anywhere anywhere) rule of the INPUT chain?
Am I overlooking something?

But the main question is: what rule to insert and where, to enable the vpn connection via ppp1 to my office network?

Last edited by J_Szucs; 07-18-2004 at 05:50 PM.
 
Old 07-18-2004, 09:59 PM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Giving you a stock answer...

iptables -nvL

would give you a better understanding of the ipfilter rules. Using iptables -L does not list the interfaces.

Last edited by ppuru; 07-18-2004 at 10:00 PM.
 
Old 07-19-2004, 06:27 PM   #3
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Stock answer:
Thanks, it works now.
 
  


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
troubles with iptables... wazilian Linux - Networking 4 03-22-2005 07:33 PM
iptables troubles ]SK[ Linux - Software 5 02-12-2005 08:52 AM
Fedora Core 2 iptables troubles scardali Linux - Networking 5 11-17-2004 02:29 PM
iptables masquerading troubles caremaker Linux - Networking 6 01-07-2004 06:21 PM
troubles with port forwarding and iptables gomen Linux - Networking 1 08-29-2003 08:32 AM

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

All times are GMT -5. The time now is 10:52 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