search for: prerouting

Displaying 20 results from an estimated 997 matches for "prerouting".

2003 Aug 28
5
Router for giving more than 1 ip
...-interface eth1 -j MASQUERADE #eth0 la interfaz de la red local iptables --append FORWARD --in-interface eth0 -j ACCEPT #activamos el forward echo 1 > /proc/sys/net/ipv4/ip_forward #reglas para enrutado de paketes... #1.- redirecciona las peticiones del puerto 21 a mi pc iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 21 -j DNAT --to 192.168.0.16:21 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 143 -j DNAT --to 192.168.0.16:143 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 993 -j DNAT --to 192.168.0.16:993 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 995 -j DNAT --...
2013 May 21
2
[Bug 821] New: Rosa
...t nat iptables -X iptables -X -t nat ############################################################################### ############################################################################### # aplicando as regras contra ataques de negacao de servico # contra ping of death # iptables -t nat -A PREROUTING -i eth1 -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT # contra ataques syn-flood # iptables -t nat -A PREROUTING -i eth1 -p tcp -m limit --limit 1/s -j ACCEPT # contra port scanners avancados (nmap) # iptables -t nat -A PREROUTING -i eth1 -p tcp --tcp-flags SYN,ACK FIN,RST -m limi...
2018 Jan 10
5
[Bug 1213] New: Nft stateless NAT (NOTRACK)
...riority: P5 Component: nft Assignee: pablo at netfilter.org Reporter: mskim128 at gmail.com I use Ubuntu 17.10 (nftables 0.8, kernel 4.13) NOTRACK is used to turn off connection tracking for all packets matching this rule. For example, in iptables: iptables -t raw -I PREROUTING -j NOTRACK I'd like to use stateless NAT (1:1)instead of iptables. nft add table NAT nft add chain NAT prerouting {type nat hook prerouting priority - 300 \; } nft add chain NAT postrouting {type nat hook postrouting priority - 300 \; } nft add rule NAT prerouting counter nft add rule NAT pr...
2006 Feb 02
0
Linux Gateway Qos_2 interfaces (1 lan and 1 internet) problem
....21 flowid 1:13 tc filter add dev eth1 parent 1: protocol ip prio 1 handle 1 fw flowid 1:10 #we want interactive traffic here tc filter add dev eth1 parent 1: protocol ip prio 6 handle 2 fw flowid 1:14 #we want p2p traffic here #Sending the TOS-bits to the appropriate classes iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j MARK --set-mark 2 iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j RETURN iptables -t mangle -A PREROU...
2005 Nov 15
3
can I use tos and fwmark at the same time?
...disc add dev $eth parent 1:FE handle FE: sfq perturb 10 $tc filter add dev $eth parent 1: protocol ip prio 0 handle $metro fw flowid 1:FE done ---------------------------------------------------------------------------------------------------------------------- output of iptables-save (mangle PREROUTING): -A PREROUTING -p tcp -m tcp --sport 80 -j TOS --set-tos 0x10 -A PREROUTING -p tcp -m tcp --dport 80 -j TOS --set-tos 0x10 -A PREROUTING -p tcp -m tcp --dport 443 -j TOS --set-tos 0x10 -A PREROUTING -p tcp -m tcp --sport 443 -j TOS --set-tos 0x10 -A PREROUTING -p tcp -m tcp --sport 5050 -j...
2005 Jul 05
0
Please: Judge this script
...1 protocol ip parent 1:0 prio 4 handle 4 fw classid 1:13 tc filter add dev eth1 protocol ip parent 1:0 prio 5 handle 5 fw classid 1:14 tc filter add dev eth1 protocol ip parent 1:0 prio 6 handle 6 fw classid 1:15 #Se dan las reglas iptables para marcar lo que nos interesa $IPTABLES -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x1 $IPTABLES -t mangle -A PREROUTING -p icmp -j RETURN $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j MARK --set-mark 0x1 $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize...
2005 Nov 25
1
2 WAN links and DNAT
...o ppp1 -j ACCEPT -A OUTPUT -d 255.255.255.255 -o ppp0 -j ACCEPT -A OUTPUT -s ipofppp1 -o ppp1 -j ACCEPT -A OUTPUT -s ipofppp0 -o ppp0 -j ACCEPT -A OUTPUT -j LOG -A OUTPUT -j DROP COMMIT # Completed on Fri Nov 25 12:21:59 2005 # Generated by iptables-save v1.2.11 on Fri Nov 25 12:21:59 2005 *mangle :PREROUTING ACCEPT [13497:7096745] :INPUT ACCEPT [119515:10818662] :FORWARD ACCEPT [2263653:1380696494] :OUTPUT ACCEPT [3681:323141] :POSTROUTING ACCEPT [2445397:1397479483] -A PREROUTING -i ppp0 -m state --state NEW -j MARK --set-mark 0x1 -A PREROUTING -i ppp1 -m state --state NEW -j MARK --set-mark 0x2 -A PR...
2004 Oct 20
1
LARTC problems with PRIO qdisc
...rent 1:0 protocol ip prio 1 handle 1 fw classid 1:10 tc filter add dev eth0 parent 1:0 protocol ip prio 2 handle 2 fw classid 1:20 tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 3 fw classid 1:30 Next I created some iptables rules for marking #Traffic for band #1 iptables -t mangle -A PREROUTING -p tcp --sport 22 -j MARK --set-mark 0x1 iptables -t mangle -A PREROUTING -p tcp --sport 22 -j RETURN iptables -t mangle -A PREROUTING -p tcp --sport 23 -j MARK --set-mark 0x1 iptables -t mangle -A PREROUTING -p tcp --sport 23 -j RETURN iptables -t mangle -A PREROUTING -p tcp --sport 21 -j MARK --s...
2004 Nov 30
2
iptables & tc - 3 marks
...l. In my iptables script, I need make 3 MARKs for the same packet, as following # It marks the packets that will go for link ADSL (I have 2 links - adsl 2Mb and ''dedicate link'' 256Mb ) # I am using ''ip rule / ip route'' to make this iptables -t mangle -A PREROUTING -p tcp --dport 21 -j MARK --set-mark 2000 iptables -t mangle -A PREROUTING -p tcp --dport 20 -j MARK --set-mark 2000 # It marks the packets that will be shapped ( upload with cbq ) iptables -t mangle -A PREROUTING -m mac 00:11:22:33:44:55 -j MARK --set-mark 501 .... iptables -t mangle -A PRE...
2005 May 18
4
HTB + IMQ + IPtables marking.
...htb rate 128kbit ceil 768kbit /sbin/tc class add dev imq1 parent 2:1 classid 2:20 htb rate 128kbit ceil 768kbit /sbin/tc filter add dev imq1 parent 2: protocol ip handle 10 fw classid 2:10 /sbin/tc filter add dev imq1 parent 2: protocol ip handle 20 fw classid 2:20 /usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 1 /usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 1 /usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.1.0/24 -j MARK --set-mark 10 /usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.2.0/24 -j MARK --set-mark 20 Please help me analyze...
2012 Feb 14
1
iptables nat PREROUTING chain
Is there a way to add a rule to the nat table (CentOS 5.7) that would alter the port number of tcp packets destined for the server itself? I have ip_forwarding enabled, but the packets don't seem to hit the prerouting chain. I have the following redirect rule in the prerouting table. I also tried DNAT, but if the packets don't hit PREROUTING, it won't work either. iptables -t nat -L -v -n Chain PREROUTING (policy ACCEPT 16079 packets, 896K bytes) pkts bytes target prot opt in out source...
2005 Dec 27
3
Ingress policing (matching netfilter marks)
...) I suspected I just might not be marking things correctly, so I tried u32 matching 0.0.0.0/0 - that worked fine, but for _all_ traffic (as it should). So I tried marking *every* packet with $MARK_BULK (and verified that the mark was correct using a log match, and watching the syslog file) in both prerouting and postrouting chains, yet this didn''t help either. Regardless of what I do, I can''t get the above filter to match anything at all - I''m sure the packets are marked correctly, I just can''t match them. Any ideas? (I''ll copy my entire configs below for...
2004 Dec 01
0
Iptables with 3 marks. It is possible?
...irewall. In my iptables script, I need make 3 MARKs for the same packet, as following # It marks the packets that will go for link ADSL (I have 2 links - adsl 2Mb and ''dedicate link'' 256Mb ) # I am using ''ip rule / ip route'' to make this iptables -t mangle -A PREROUTING -p tcp --dport 21 -j MARK --set-mark 2000 iptables -t mangle -A PREROUTING -p tcp --dport 20 -j MARK --set-mark 2000 # It marks the packets that will be shapped ( upload with cbq ) iptables -t mangle -A PREROUTING -m mac 00:11:22:33:44:55 -j MARK --set-mark 501 .... iptables -t mangle -A PREROUTIN...
2005 Sep 29
7
need help on multiple isp routing
...-j ACCEPT iptables -A FORWARD -i ppp1 -p tcp -m tcp --dport 5000:5010 -j ACCEPT iptables -A FORWARD -i ppp1 -p tcp -m tcp --dport 15402 -j ACCEPT iptables -A FORWARD -i ppp1 -p udp -m udp --dport 15402 -j ACCEPT iptables -A FORWARD -i ppp+ -m state --state NEW,INVALID -j DROP iptables -t mangle -A PREROUTING -p icmp -m icmp -j TOS --set-tos Minimize-Delay iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m length --length 0:128 -j TOS --set-tos Minimize-Delay iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m length --length 128: -j TOS --set-tos...
2005 Jul 06
2
Please: "judge" this script
...1 protocol ip parent 1:0 prio 4 handle 4 fw classid 1:13 tc filter add dev eth1 protocol ip parent 1:0 prio 5 handle 5 fw classid 1:14 tc filter add dev eth1 protocol ip parent 1:0 prio 6 handle 6 fw classid 1:15 #Se dan las reglas iptables para marcar lo que nos interesa $IPTABLES -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x1 $IPTABLES -t mangle -A PREROUTING -p icmp -j RETURN $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j MARK --set-mark 0x1 $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN $IPTABLES -t mangle -A PREROUTING -m tos --tos Minimize...
2007 Jun 08
5
CBQ + Layer7 x Emule
...r ------------------- FC6 Box -------------------- Emule Box external ADSL : Dynamic Internal ADSL : 192.168.254.1 external FC6 : 192.168.254.3 internal FC6 : 192.168.253.1 Emule Box : 192.168.253.3 I guess that everything is ok with layer7 . Here my mangle rules . # iptables -t mangle -A PREROUTING -mlayer7 --l7proto edonkey -j MARK --set-mark 2 # iptables -t mangle -A PREROUTING -m mark --mark 2 -j LOG --log-prefix "PREROUTING MARK : " iptables -t mangle -A FORWARD -mlayer7 --l7proto edonkey -j MARK --set-mark 2 iptables -t mangle -A FORWARD -m mark --mark 2 -j LOG --log-prefix &...
2017 Feb 03
4
[Bug 1117] New: Table ipv4-nat prerouting dnat doesn't accept dest IP:PORT
https://bugzilla.netfilter.org/show_bug.cgi?id=1117 Bug ID: 1117 Summary: Table ipv4-nat prerouting dnat doesn't accept dest IP:PORT Product: nftables Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: nft Assignee: pablo a...
2011 Sep 06
2
[Bug 747] New: IPtables marked packets not being inpsected in NAT table.
...0 pkt per second with mark "02" the next 100 pkts per second with mark "03" the logic at the NAT table to REDIRECT these packets to port 515, 516 and so on respectively. Here is what my iptables looks like # Generated by iptables-save v1.4.4 on Tue Sep 6 11:15:41 2011 *raw :PREROUTING ACCEPT [376977:223804194] :OUTPUT ACCEPT [2336:364875] COMMIT # Completed on Tue Sep 6 11:15:41 2011 # Generated by iptables-save v1.4.4 on Tue Sep 6 11:15:41 2011 *filter :INPUT ACCEPT [243453:140022777] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [6891:2265445] -A INPUT -p udp -m udp --dport 514 -j AC...
2005 Jun 22
1
Problem with HTB and IPTABLES
...ng some problems when create a HTB queue. ALL packets goes to the default queue, they don’t care about any mark or ip field I use to enqueue them. : -/ That’s the deal, all packets that incoming the interface eth2 are classified and have theirs TOS field changed following some qos policy at the PREROUTING LEVEL. Next, all packets are marked following the tos field previous changed, and them enqueued and labeled following the iptables marks. I’ve checked using ethereal, and all the packets’ TOS field are been correctly changed, and the packets are been sent to the right mpls tunnel with the righ...
2007 Mar 09
2
Mark on FTP passive traffic
...NAL_IP1 --sport $UNPRIVPORTS --dport 21 -m state --state NEW -j ACCEPT # FTP mark iptables -t mangle -A FORWARD -o $EXTERNAL_INTERFACE1 -p tcp --dport 21 -j MARK --set-mark 0x21 iptables -t mangle -A OUTPUT -o $EXTERNAL_INTERFACE1 -p tcp --dport 21 -j MARK --set-mark 0x21 iptables -t mangle -A PREROUTING -i $INTERNAL_INTERFACE -p tcp --dport 21 -j MARK --set-mark 0x21 iptables -t mangle -A FORWARD -o $EXTERNAL_INTERFACE1 -p tcp --dport 20 -j MARK --set-mark 0x21 iptables -t mangle -A OUTPUT -o $EXTERNAL_INTERFACE1 -p tcp --dport 20 -j MARK --set-mark 0x21 iptables -t mangle -A PREROUTING -i $IN...