LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2004, 01:53 PM   #1
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
strange problem


heya

i have a box running slackware running as a router/firewall with apache serving up a few files.

every machine behind the firewall can connect to the internet fine but the router/firewall itself doesnt want to connect to the web, ftp, irc etc, even though it does obviously have a internet connection as all the machines behind it can connect without a problem.

thinking it was a iptables issue i flushed the tables completly, although this hasnt helped.

i cant ping anything, and it fails to revolve hostnames, although i also know its not a dns problem as it uses the same dns server as machines on the lan behind it.

obviously i've restarted networking etc but am i stuck.

any help would be great. cheers.
 
Old 09-20-2004, 08:20 PM   #2
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Rep: Reputation: 30
so you want to login to your router and use it to connect to other machines...?
 
Old 09-21-2004, 02:51 AM   #3
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Original Poster
Rep: Reputation: 30
well yes.

i want to be able to grab updates, packages and such from it.
 
Old 09-21-2004, 09:45 AM   #4
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Original Poster
Rep: Reputation: 30
*bump*
 
Old 09-21-2004, 12:19 PM   #5
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
I'm no iptables expert, but it sounds like you need to add some iptable rules that grant your firewall access to services like web, dns ,etc.... Think of the problem you describe as - requests (packets) that originate from your firewall do not hit the FORWARD chain like those from your LAN.
 
Old 09-21-2004, 01:20 PM   #6
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Original Poster
Rep: Reputation: 30
i really dont think its an iptables issue as i've gone back to older versions of my 'script' that i know work. never the less, here's my ./rc.firewall.

#!/bin/sh
#1.1
#

iptables --flush
iptables -t nat --flush
iptables -t mangle --flush

iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P INPUT DROP
iptables -P OUTPUT DROP

iptables -A OUTPUT -j ACCEPT -m state --state NEW -o eth0 -p tcp

echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

#######
various local bits and bats removed
#######

iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATE -j ACCEPT

iptables -t nat -I PREROUTING -p tcp --dport xx:xx -j DNAT --to-destination x.x.x.x
 
Old 09-21-2004, 05:27 PM   #7
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Rep: Reputation: 30
kinda long and not to good...You will need -j before DROP, REJECT, FORWARD, ACCEPT
 
Old 09-22-2004, 12:27 PM   #8
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Original Poster
Rep: Reputation: 30
*bump*
 
Old 09-22-2004, 03:37 PM   #9
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Rep: Reputation: 30
as in this lines:
iptables -P INPUT DROP
iptables -P OUTPUT DROP
 
  


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
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM
strange problem :) salmanucit Linux - Software 1 07-23-2004 06:47 PM
wx-config problem strange problem plz help glacier1985 Linux - Software 4 07-26-2003 05:20 PM
strange x problem frieza Linux - Software 0 03-25-2003 11:20 PM
Very Strange Problem tengj6 Linux - Networking 3 03-06-2002 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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