LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-10-2005, 06:44 PM   #1
carloconcillado
LQ Newbie
 
Registered: Jun 2005
Location: Philippines
Posts: 4

Rep: Reputation: 0
Linux Network Problem


Hi, I have a PC router using IP tables for routings. The problem is, my PC right beside my PC router cannot browse to internet but the other protocols can pass thru my PC router. Im using DNS server in back of my PC router. (i mean out of PC my network). Im using FC2 and my firewall is IP tables v1.1. Thanks.
 
Old 06-10-2005, 09:01 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
sounds like you still need to switch http on somewhere - either the router or at the PC. An easy check - turn the PC firewall off and then try.

So what are the route and iptables settings/config (router and PC) with regards http packets?
 
Old 06-11-2005, 10:02 PM   #3
carloconcillado
LQ Newbie
 
Registered: Jun 2005
Location: Philippines
Posts: 4

Original Poster
Rep: Reputation: 0
Smile

Here, please take a look at my IPtables config...

#!/bin/bash
# $Id: iptables-rules.sh,v 1.1 2002/06/18 11:36:51 eric Exp $

# location of ipchains
IPTABLES=/sbin/iptables

# flush all rules
$IPTABLES -F
$IPTABLES -F -t nat

# allow from localhost
$IPTABLES -A INPUT -i lo -j ACCEPT

$IPTABLES -A INPUT -s 192.168.0.0/24 -j ACCEPT
#$IPTABLES -A INPUT -s 192.168.1.0/24 -j ACCEPT
$IPTABLES -A INPUT -s 192.168.2.0/24 -j ACCEPT

# turn on IP Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
ip route add 192.168.0.1/24 via 192.168.1.1 2>/dev/null >/dev/null

#Transparent Proxying
# $IPTABLES -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
# $IPTABLES -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j REDIRECT --to-port 3128

# stateful: allow incoming from establish connections
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# TRAFFIC SHAPING
# Mark acknowledge packets of an established session between 40 and 100 bytes:


$IPTABLES -t mangle -A PREROUTING -p tcp --tcp-flags ALL ACK -m state --state ESTABLISHED -m length --length 8:10 -j MARK --se
t-mark 20


# Mark SSH packets that starts new sessions with a packet length between 40 and 68 bytes:

$IPTABLES -t mangle -A PREROUTING -p tcp --dport 22 --syn -m state --state NEW -m length --length 40:68 -j MARK --set-mark 22


# location of ipchains
IPTABLES=/sbin/iptables

# flush all rules
$IPTABLES -F
$IPTABLES -F -t nat

# allow from localhost
$IPTABLES -A INPUT -i lo -j ACCEPT


# stateful: allow incoming from establish connections
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -t mangle -A PREROUTING -s 192.168.3.0/24 -j MARK --set-mark 20

# allow icmp
# 0 - echo-request (pong)
# 3 - destination-unreachable
# 4 - source-quench
# 5 - redirect
# 8 - echo-request (ping)
# 11 - time-exceeded
# 12 - parameter-problem
$IPTABLES -A INPUT -p icmp --icmp-type 0 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 3 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 4 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 8 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 11 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 12 -j ACCEPT
$IPTABLES -A INPUT -p icmp -j DROP

# log
$IPTABLES -A INPUT -p udp --dport 137:139 -j DROP
$IPTABLES -A INPUT -p tcp --dport 135 -j DROP
$IPTABLES -A INPUT -p tcp --dport 139 -j DROP
$IPTABLES -A INPUT -p tcp --dport 2600 -j DROP

# block all incoming connections
$IPTABLES -A INPUT -p tcp --dport 22 -j LOG
$IPTABLES -A INPUT -p tcp --dport 10000 -j LOG
$IPTABLES -A INPUT -p tcp --dport 7000 -j LOG

#$IPTABLES -A INPUT -j LOG --log-level 6 --log-prefix "iptables "
$IPTABLES -A INPUT -j DROP

All firewalls exept my iptables is off.
My PC can ping ip addresses on the internet but only the DNS server is not responding. I have a test PC using different subnet of my PC router (i devided my ip's into 2 subnets, 1 subnet for my PC router and one for my test PC), im using same DNS server and it works.

Here is my network diagram...


ISP --------------- PC router ----------------- Router --------------- My PC

Any help would be appriciated.

Thanks.
 
  


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
network setup and browsing problem in linux 9 mayukhbd Linux - Networking 3 04-12-2004 01:20 AM
Network problem on rh linux borisys Red Hat 1 01-06-2004 07:04 AM
Linux network problem scracker Linux - Networking 11 10-18-2003 07:15 AM
Linux Laptop Network Problem topace Linux - Laptop and Netbook 19 07-08-2003 07:19 PM
Linux/XP Network problem GabeF Linux - Networking 9 09-09-2002 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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