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 08-31-2005, 06:48 AM   #1
alan.belizario
LQ Newbie
 
Registered: Mar 2005
Location: Philippines
Posts: 16

Rep: Reputation: 0
Can't use ymessenger and limewire


Can you guys help, I recently made a squid proxy server running on fedora core 4. I'm having problems in connecting my ymessenger and limewire. I can't seem to access both application through the net. I disabled selinux and made a iptable script. even if i turn off iptables these application won't run, its always disconnected.


Iptables script

#!/bin/sh

LAN="eth1"
INTERNET="eth0"
IPTABLES="/sbin/iptables"


#tmtli firewall

# Drop ICMP echo-request messages sent to broadcast or multicast addresses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# Drop source routed packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route

# Enable TCP SYN cookie protection from SYN floods
echo 1 > /proc/sys/net/ipv4/tcp_syncookies

# Don't accept ICMP redirect messages
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

# Don't send ICMP redirect messages
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects

# Enable source address spoofing protection
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter

# Log packets with impossible source addresses
echo 1 > /proc/sys/net/ipv4/conf/all/log_martians

# Flush all chains
$IPTABLES --flush

# Allow unlimited traffic on the loopback interface
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT
$IPTABLES -A FORWARD -i lo -j ACCEPT

# Set default policies
$IPTABLES --policy INPUT DROP
$IPTABLES --policy OUTPUT DROP
$IPTABLES --policy FORWARD DROP

# Previously initiated and accepted exchanges bypass rule checking
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow incoming port 22 (ssh) connections on LAN interface
$IPTABLES -A INPUT -i $LAN -p tcp --destination-port 22 -m state \
--state NEW -j DROP

# Allow incoming port 3128 (squid) connections on LAN interface
$IPTABLES -A INPUT -i $LAN -p tcp --destination-port 3128 -m state \
--state NEW -j ACCEPT

# Allow ICMP ECHO REQUESTS on LAN interface
$IPTABLES -A INPUT -i $LAN -p icmp --icmp-type echo-request -j ACCEPT

# Allow DNS resolution
$IPTABLES -A OUTPUT -o $INTERNET -p udp --destination-port 53 -m state \
--state NEW -j ACCEPT
$IPTABLES -A OUTPUT -o $INTERNET -p tcp --destination-port 53 -m state \
--state NEW -j ACCEPT

# Allow ntp synchronization
$IPTABLES -A OUTPUT -o $INTERNET -p udp --destination-port 123 -m state \
--state NEW -j ACCEPT

# Allow Squid to proxy http and https

$IPTABLES -A OUTPUT -o $INTERNET -p tcp --destination-port 80 -m state \
--state NEW -j ACCEPT
$IPTABLES -A OUTPUT -o $INTERNET -p tcp --destination-port 443 -m state \
--state NEW -j ACCEPT

$IPTABLES -A OUTPUT -o $INTERNET -p tcp --destination-port 5190 -m state \
--state NEW -j ACCEPT

$IPTABLES -A INPUT -i $WEBSERVER -p tcp --destination-port 80 -m state \
--state NEW -j ACCEPT

echo goodbye!
#exit

Thanks
 
Old 09-04-2005, 01:32 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
I'm not 100% sure, but I don't believe limewire will work with squid. Have tried simply forwarding the limewire traffic out of your LAN and then Masquerading/SNATing then traffic as it leaves the gateway?
Like this:
iptables -A FORWARD -s $LAN -i $LAN_INTERFACE -p tcp --dport 6346 -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTERNAL_INTERFACE -p tcp --dport 6346 -j SNAT --to-source X.X.X.X

where X.X.X.X is your external IP address of the firewall. If you have a dynamic IP address that can change, then use -j MASQUERADE instead.

On the otherhand, I do believe that squid can be used to proxy ymessenger traffic. Try adding an the ymessenger ports to your squid Safe_ports acl list
acl Safe_ports port 5050

Might want to try adding limewire port too, just to see if it will proxy the traffic (I doubt it though)
 
  


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
ymessenger? rohitgarodia123 Linux - Newbie 2 07-13-2005 08:31 PM
Ymessenger crash when reciving a file from another Ymessenger user Kilt Linux - Newbie 3 06-15-2005 07:04 AM
ymessenger... navaladi Mandriva 10 12-24-2004 11:53 AM
ymessenger install ibrewale Linux - Software 4 08-19-2004 05:21 AM
ymessenger install ibrewale Debian 6 07-02-2004 05:02 PM

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

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