LinuxQuestions.org
Visit Jeremy's Blog.
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 12-03-2005, 12:50 PM   #1
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 69

Rep: Reputation: 15
iptables masquarading problem with https


Hello everybody!

I have the following problem here: I have a linux and a windows PC. The linux PC is connected to the Internet via DSL, the windows PC is connected to the linux PC. I use iptables masquarading to share the internet connection. This works fine, except I'm not able to access any https:// pages from the windows PC (they work fine from linux).

Any ideas what could be wrong? I'll post my whole iptables script here in case there's anything important, the masquarading line is bold: (the script's off the internet, I have no idea about iptables - love to learn it, but time's a rare commodity around here )

Code:
#!/bin/sh
IPT="/sbin/iptables"

INT="ppp0"

$IPT -F
$IPT -F INPUT
$IPT -F OUTPUT
$IPT -F FORWARD
$IPT -F -t mangle
$IPT -F -t nat
$IPT -X

$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

$IPT -t nat -A POSTROUTING -o $INT -j MASQUERADE

$IPT -A FORWARD -i $INT -m state --state NEW,INVALID -j DROP

$IPT -N firewall
$IPT -A firewall -m limit --limit 15/minute -j LOG --log-prefix Firewall:
$IPT -A firewall -j DROP
$IPT -N dropwall
$IPT -A dropwall -m limit --limit 15/minute -j LOG --log-prefix Dropwall:
$IPT -A dropwall -j DROP
$IPT -N badflags
$IPT -A badflags -m limit --limit 15/minute -j LOG --log-prefix Badflags:
$IPT -A badflags -j DROP
$IPT -N silent
$IPT -A silent -j DROP
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A INPUT -s 192.168.10.25 -d 0/0 -p all -j ACCEPT
$IPT -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL ALL -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j badflags
$IPT -A INPUT -p tcp --tcp-flags ALL NONE -j badflags
$IPT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j badflags
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j badflags
$IPT -A INPUT -p icmp --icmp-type 0 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 3 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 11 -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type 8 -m limit --limit 1/second -j ACCEPT
$IPT -A INPUT -p icmp -j firewall
$IPT -A INPUT -i $INT -s 0/0 -d 0/0 -p tcp --dport 22 -j ACCEPT
$IPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPT -A INPUT -p udp --sport 137 --dport 137 -j silent
$IPT -A INPUT -j dropwall
Thanks a lot in advance!
 
Old 12-09-2005, 08:38 AM   #2
nbd
Member
 
Registered: Aug 2002
Posts: 41

Rep: Reputation: 15
What is the interface between Windows and Linux?

Quote:
$IPT -A INPUT -s 192.168.10.25 -d 0/0 -p all -j ACCEPT
What is the interface for this? If it's not defined, I guess it will mean all interfaces. That means that anyone from internet with that IP, can get through.

Although that IP is in restricted IP space, the attacker could somehow fake his/her IP to be that.
 
  


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
Iptables not allowing outbound https john8675309 Linux - Software 3 09-13-2004 10:41 PM
Problem with https connections - iptables Suse9.0 mschna Linux - Networking 2 02-12-2004 01:54 AM
Iptables and https sturla69 Linux - Security 6 09-16-2003 10:13 PM
IP Masquarading netkepala Linux - Networking 3 09-09-2002 06:41 AM
Ip masquarading hiswitzend Linux - Newbie 2 12-19-2001 01:54 AM

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

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