IP-SPoofing, i want to modify those iptables-rules...URGENT!

Hi

I got one public Internet-network (subnet). And because i want to use public IP's in our network behind firewall i got host-routing those unused public IPs thru Astaro. 

Fine, it works... i mean it does not work, because Astaro makes SPOOF_DROP -chain to Nat-table, and when i try to communicate with Internet Astaro drops all packets. I can ping those public IPs from Internet and it works okay (heh). 

Okay, so i logged to Astaro with SSH and manually deleteted in PREROUTING -chain SPOOF_DROP -link, and Astaro went crazy ;( I restarted machine after this modificating and all iptables rules were gone! WHOAH! And when i try to restore from backup, no hope, still all rules gone. Then i restarted even older backup and i got rules back, then i restore my new backup and restarted machine again... Still all iptables rules gone. Then i restore my older backup and that's it... My version is 3.041. I suspect that backup does not work with that version ;(. 

But my probles is those ip spoofing rules, how can i modify those, so i can communicate with Public IPs from behind firewall (firewall's public interface IP is in same subnet where those IPs are).
Parents
  • Why are you using NAT if they are public IP's?
  • quote:
    Originally posted by barrygould:
    Why are you using NAT if they are public IP's?


    i have also couple private subnets (10.x.x.x) and i masq those, so they can use inet.
  • Hi there!

    I've got a similar problem. I would like to insert the operator NOT (!) in a certain rule but I can't do that in the WebAdmin. So I decided to do that by hand. The problem is that ASL doesn't keep those rules.
    I've looked in the config files, but I can't find the files that configure the iptables or the files where the rules are kept.

    So, if Astaro people could add a new field in the form where we create the networks with the possíbility to deny a network it would be great. Better solution would be give access to a file where we could insert the iptables rules by hand, including the NAT rules.

    Tks
  • hi
    our subnet a.b.c.0 is subnet of a.b.0.0 
    (that easy) ;-)
    so the asl-outer NIC had a route a.b.0.0,
    internal NIC had a route a.b.c.0.
    because these are part of a.b.0.0, the kernel decided to send all packets to outside.
    so i believe you can ping from outside, and get the packet back. but you may not be able to ping from inside.

    i took x.y.z.0 inside and made masq on eth1, also NAT-rules for some special machines.

    so it works, but remember for each incoming service a separate NAT-rule .....

    christian
  • bullsh... what i was writing ....

    it seems to be same thing with ip-spoofing ....
    has anybody a solution for this yet???

    kind regards,
    christian  
  • [ QUOTE ]
    bullsh... what i was writing ....

    it seems to be same thing with ip-spoofing ....
    has anybody a solution for this yet???

    kind regards,
    christian   

    [/ QUOTE ]

    Heh, solution was to use Proxy-ARP and use netmask 255.255.255.255 to out-interface.Then i just routed IP-addresses to where i wanted. Works OK. 

    So it was no need to manually change those iptable-entries.
       
  • hi,

    i also tried ProxyArp and netmask 32 on ethOutside, but it didn't work on my place.

    but creating a file: /etc/rc.d/ipnat.local (mode 400)  seams to help.
    It works with shutting off spoof-protection totally,
    i'm working on a more precise solution ;-)

    kind regards
      
  • lets say you have
    eth0: a.b.c.d/255.255.255.0 (network0)
    eth1: a.b.x.y/255.255.0.0 (network1)
    -
    you cannot access asl-box from eth0.
    cou can reach both networks from asl-box.
    login as root on console.

    iptables -t nat -L SPOOF_DROP -nv --line-numbers
    look for two lines with eth0 and a.b.0.0/16
    (should be one with LOG, one with DROP)

    delete these entries by line-nr (maybe 17, 18)
    iptables -t nat -D SPOOF_DROP 18
    iptables -t nat -D SPOOF_DROP 17
    (18 will change if you delete 17 first ;-)

    try to connetct from eth0-network again ....
    try to be lucky until you change some setting on the interfaces ..... :-(

    hope it helps ....

    proxy arp could have a problem with /16 /24 subnets, but asl-people don't believe me ... 

    but i keep on trying ...  
  • hey, it works now!

    took a.b.x.y/32 netmask on outer interface,
    and just added the route .... exactly as you wrote before ... 
    well so it doesn't find ip-spoofing any longer.
    only thing is, that the main-router of ISP (university) needed something like 4 hours to recognize new arp-table for my proxy-arp ...     and i was searching for mistakes on my machine ....
    so now it works fine ...  
Reply
  • hey, it works now!

    took a.b.x.y/32 netmask on outer interface,
    and just added the route .... exactly as you wrote before ... 
    well so it doesn't find ip-spoofing any longer.
    only thing is, that the main-router of ISP (university) needed something like 4 hours to recognize new arp-table for my proxy-arp ...     and i was searching for mistakes on my machine ....
    so now it works fine ...  
Children
No Data